From 5efe34e6483ea01fa34c3b8909d9884bd0e45e95 Mon Sep 17 00:00:00 2001 From: Devops Date: Sun, 1 Mar 2026 21:34:36 +0530 Subject: [PATCH 1/6] Added Dockerfile in Caterpiller_Game --- Caterpillar_Game/Dockerfile | 12 ++++++++++++ Caterpillar_Game/README.md | 28 +++++++++++++++++++++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 Caterpillar_Game/Dockerfile diff --git a/Caterpillar_Game/Dockerfile b/Caterpillar_Game/Dockerfile new file mode 100644 index 00000000..eb9ed78c --- /dev/null +++ b/Caterpillar_Game/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.12-slim + +RUN apt-get update && apt-get install -y \ + python3-tk \ + xvfb \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /app + +COPY . . + +CMD ["python3", "Caterpillar.py"] diff --git a/Caterpillar_Game/README.md b/Caterpillar_Game/README.md index 9d6cc298..be39f286 100644 --- a/Caterpillar_Game/README.md +++ b/Caterpillar_Game/README.md @@ -22,9 +22,35 @@ Running the script is really simple! Just open a terminal in the folder where yo ```sh python Caterpillar.py ``` +## How to run as a docker file +# Steps: +1. Connect to the server with X11 forwarding: +```bash +ssh -X @ +``` + +2. Allow X11 access: +```bash +xhost +local:docker +``` + +3. Build the Docker image: +```bash +docker build -t caterpillar-game . +``` + +4. Run the container: +```bash +docker run --network host \ + -e DISPLAY=localhost:10.0 \ + -e XAUTHORITY=/home/devops/.Xauthority \ + -v /home/devops/.Xauthority:/home/devops/.Xauthority \ + caterpillar-game +``` + ## 📺 Demo

## 🤖 Author -[Leah Nguyen](https://github.com/ndleah) \ No newline at end of file +[Leah Nguyen](https://github.com/ndleah) From 6a3a62195b0f1ce4d3335c48abb4d6206b6f690a Mon Sep 17 00:00:00 2001 From: Gauri Date: Sun, 1 Mar 2026 23:31:35 +0530 Subject: [PATCH 2/6] Created Docker file for Animalese_translator --- Animalese_translator/.gitignore | 1 + Animalese_translator/Dockerfile | 20 ++++++++++++++++++++ Animalese_translator/README.md | 17 ++++++++++++++++- Animalese_translator/main.py | 7 ++++--- Animalese_translator/requirements.txt | 3 +++ 5 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 Animalese_translator/.gitignore create mode 100644 Animalese_translator/Dockerfile create mode 100644 Animalese_translator/requirements.txt diff --git a/Animalese_translator/.gitignore b/Animalese_translator/.gitignore new file mode 100644 index 00000000..ea1472ec --- /dev/null +++ b/Animalese_translator/.gitignore @@ -0,0 +1 @@ +output/ diff --git a/Animalese_translator/Dockerfile b/Animalese_translator/Dockerfile new file mode 100644 index 00000000..9364498b --- /dev/null +++ b/Animalese_translator/Dockerfile @@ -0,0 +1,20 @@ +FROM python:3.12-slim + +WORKDIR /app + +RUN apt-get update && apt-get install -y \ + python3-gi \ + gir1.2-gstreamer-1.0 \ + gstreamer1.0-plugins-base \ + gstreamer1.0-plugins-good \ + python3-gst-1.0 \ + && rm -rf /var/lib/apt/lists/* + +COPY requirements.txt . + +RUN pip install --upgrade pip && \ + pip install -r requirements.txt --break-system-packages + +COPY . . + +CMD ["python3", "main.py"] diff --git a/Animalese_translator/README.md b/Animalese_translator/README.md index f4072203..846fe813 100644 --- a/Animalese_translator/README.md +++ b/Animalese_translator/README.md @@ -34,6 +34,21 @@ and how to install them. ## 🌟 How to run Steps on how to run the script along with suitable examples. +1. Build docker image +```bash +docker build -t animalese_translator . +``` + +2. Run the container +```bash +docker run -v $(pwd)/output:/app/output animalese_translator +``` + +3. Check output on your localhost the output folder will get created +```bash +aplay output/Hello_World.wav +``` +Run this cmd. ## 📺 Demo Add a Screenshot/GIF showing the sample use of the script (jpeg/png/gif). @@ -42,4 +57,4 @@ Add a Screenshot/GIF showing the sample use of the script (jpeg/png/gif). Adapted from [vegalious](https://github.com/wegfawefgawefg) -[Yurner0](https://github.com/Yurnero-cyber) \ No newline at end of file +[Yurner0](https://github.com/Yurnero-cyber) diff --git a/Animalese_translator/main.py b/Animalese_translator/main.py index 7a53a0ba..c0026f29 100644 --- a/Animalese_translator/main.py +++ b/Animalese_translator/main.py @@ -16,7 +16,7 @@ import numpy as np # if you pip install scipy numpy will come too -voice_path = "/home/wilson/Documentos/git_repo/python-mini-project/Animalese_translator/voices/guy3" +voice_path = "/app/voices/guy3" files = os.listdir(voice_path) # lists the containing names of the entries of the specified directory @@ -59,7 +59,7 @@ # say_this = "pastee luuk at des" # say_this = "kil haw es yor de goeng" # say_this = "weleam haw was yor de" -say_this = "i med somteng kul" +say_this = "Hello World" # say_this = "ame i lov yuu vere alat" # say_this = "ef yu wurk hard yu wel hav a gud lif" @@ -106,6 +106,7 @@ file_path = os.path.join(output_dir, name + '.wav') write_rate = int(sample_rate*speed_multiplier) write(file_path, write_rate, base.astype(np.int16)) -playsound(file_path) +#playsound(file_path) +print(f"Audio saved to {file_path}") # for file in files: # playsound(voice_path + "/" + file) diff --git a/Animalese_translator/requirements.txt b/Animalese_translator/requirements.txt new file mode 100644 index 00000000..7e4bdb2c --- /dev/null +++ b/Animalese_translator/requirements.txt @@ -0,0 +1,3 @@ +playsound==1.2.2 +scipy +numpy From 02e87264a60de5ec775d72e29ccb9399ba92db94 Mon Sep 17 00:00:00 2001 From: "Gauri Tambe." <154447205+gauritambe@users.noreply.github.com> Date: Mon, 2 Mar 2026 11:47:48 +0530 Subject: [PATCH 3/6] Update README.md --- Animalese_translator/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Animalese_translator/README.md b/Animalese_translator/README.md index 846fe813..2ad5acef 100644 --- a/Animalese_translator/README.md +++ b/Animalese_translator/README.md @@ -52,6 +52,8 @@ Run this cmd. ## 📺 Demo Add a Screenshot/GIF showing the sample use of the script (jpeg/png/gif). +image + ## 🤖 Author From 8832994be16f13f6d738c66b909a5b8930f6bdda Mon Sep 17 00:00:00 2001 From: Gauri Date: Mon, 2 Mar 2026 11:49:03 +0530 Subject: [PATCH 4/6] Added output of code --- Animalese_translator/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/Animalese_translator/README.md b/Animalese_translator/README.md index 2ad5acef..85c972b1 100644 --- a/Animalese_translator/README.md +++ b/Animalese_translator/README.md @@ -51,7 +51,6 @@ aplay output/Hello_World.wav Run this cmd. ## 📺 Demo -Add a Screenshot/GIF showing the sample use of the script (jpeg/png/gif). image From cef2c8df72e4bcf11cca6c9dece6595c05eb5f98 Mon Sep 17 00:00:00 2001 From: Gauri Date: Mon, 2 Mar 2026 12:34:55 +0530 Subject: [PATCH 5/6] Updated README file --- Caterpillar_Game/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Caterpillar_Game/README.md b/Caterpillar_Game/README.md index be39f286..9596984d 100644 --- a/Caterpillar_Game/README.md +++ b/Caterpillar_Game/README.md @@ -22,8 +22,8 @@ Running the script is really simple! Just open a terminal in the folder where yo ```sh python Caterpillar.py ``` -## How to run as a docker file -# Steps: +## How to run as a docker file. For Ubuntu machine. +### Steps: 1. Connect to the server with X11 forwarding: ```bash ssh -X @ @@ -43,8 +43,8 @@ docker build -t caterpillar-game . ```bash docker run --network host \ -e DISPLAY=localhost:10.0 \ - -e XAUTHORITY=/home/devops/.Xauthority \ - -v /home/devops/.Xauthority:/home/devops/.Xauthority \ + -e XAUTHORITY=.Xauthority \ + -v .Xauthority:.Xauthority \ caterpillar-game ``` From f0b6cdd6616f4addbd4730203d0173916b910af3 Mon Sep 17 00:00:00 2001 From: Gauri Date: Mon, 2 Mar 2026 12:37:48 +0530 Subject: [PATCH 6/6] Updated README file --- Caterpillar_Game/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Caterpillar_Game/README.md b/Caterpillar_Game/README.md index 9596984d..5bc0e1f4 100644 --- a/Caterpillar_Game/README.md +++ b/Caterpillar_Game/README.md @@ -43,8 +43,8 @@ docker build -t caterpillar-game . ```bash docker run --network host \ -e DISPLAY=localhost:10.0 \ - -e XAUTHORITY=.Xauthority \ - -v .Xauthority:.Xauthority \ + -e XAUTHORITY=/home/$USER/.Xauthority \ + -v /home/$USER/.Xauthority:/home/$USER/.Xauthority \ caterpillar-game ```