Skip to content

Added Dockerfile and execution guide for Animalese Translator & Caterpillar Game#426

Open
gauritambe wants to merge 6 commits intondleah:mainfrom
gauritambe:main
Open

Added Dockerfile and execution guide for Animalese Translator & Caterpillar Game#426
gauritambe wants to merge 6 commits intondleah:mainfrom
gauritambe:main

Conversation

@gauritambe
Copy link

What this PR does

This PR adds Docker support and updated documentation for two projects: Animalese Translator and Caterpillar Game, making them easier to run on any machine.


Changes Made

🐛 Caterpillar Game

🐳 Added Dockerfile

  • Added a Dockerfile to containerize the Caterpillar Game
  • Installs python3-tk and xvfb for GUI support inside Docker
  • Configured to run the game using Python 3

📖 Updated README

  • Added step-by-step Docker instructions to build and run the game
  • Added X11 forwarding setup to display the game window on the host machine

How to Run:

# Build
docker build -t caterpillar-game .

# Allow X11 access
xhost +local:docker

# Run with display forwarding
docker run --network host \
  -e DISPLAY=localhost:10.0 \
  -e XAUTHORITY=/home/$USER/.Xauthority \
  -v /home/$USER/.Xauthority:/home/$USER/.Xauthority \
  caterpillar-game

🎵 Animalese Translator

🐳 Added Dockerfile

  • Added a Dockerfile to containerize the application
  • Installs all required system dependencies (python3-gi, gstreamer, etc.)
  • Sets the correct voice path to /app/voices/guy3 for container execution
  • Outputs generated .wav files to the output/ directory

🛠️ Fixed main.py

  • Updated voice_path from hardcoded local path to /app/voices/guy3
  • Removed playsound call inside container since audio playback requires host machine

📄 Added requirements.txt

  • playsound==1.2.2 (1.3.0 is broken on Python 3.12)
  • scipy
  • numpy

📖 Updated README

  • Added Docker instructions to build and run the project
  • Added steps to play the generated audio file on the host machine

How to Run:

# Build
docker build -t animalese_translator .

# Run
docker run -v $(pwd)/output:/app/output animalese_translator

# Play the output on host
aplay output/Hello_World.wav

Why these changes?

Both projects had hardcoded local paths and no containerization support, making them difficult to run on different machines. This PR makes both projects portable and beginner-friendly with clear Docker-based setup instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant