kiuuiro commited on
Commit
418a000
·
verified ·
1 Parent(s): 94a0338

Upload 4 files

Browse files
Files changed (4) hide show
  1. Dockerfile +34 -0
  2. LICENSE +21 -0
  3. Makefile +22 -0
  4. docker-compose.yaml +16 -0
Dockerfile ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # syntax=docker/dockerfile:1
2
+ FROM python:3.10-bullseye
3
+
4
+ # Expose the required port
5
+ EXPOSE 6969
6
+
7
+ # Set up working directory
8
+ WORKDIR /app
9
+
10
+ # Install system dependencies, clean up cache to keep image size small
11
+ RUN apt update && \
12
+ apt install -y -qq ffmpeg && \
13
+ apt clean && rm -rf /var/lib/apt/lists/*
14
+
15
+ # Copy application files into the container
16
+ COPY . .
17
+
18
+ # Create a virtual environment in the app directory and install dependencies
19
+ RUN python3 -m venv /app/.venv && \
20
+ . /app/.venv/bin/activate && \
21
+ pip install --no-cache-dir --upgrade pip && \
22
+ pip install --no-cache-dir python-ffmpeg && \
23
+ pip install --no-cache-dir torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cu121 && \
24
+ if [ -f "requirements.txt" ]; then pip install --no-cache-dir -r requirements.txt; fi
25
+
26
+ # Define volumes for persistent storage
27
+ VOLUME ["/app/logs/"]
28
+
29
+ # Set environment variables if necessary
30
+ ENV PATH="/app/.venv/bin:$PATH"
31
+
32
+ # Run the app
33
+ ENTRYPOINT ["python3"]
34
+ CMD ["app.py"]
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2025 AI Hispano
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
Makefile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .PHONY:
2
+ .ONESHELL:
3
+
4
+ # Show help message
5
+ help:
6
+ @grep -hE '^[A-Za-z0-9_ \-]*?:.*##.*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
7
+
8
+ # Install dependencies
9
+ run-install:
10
+ apt-get -y install build-essential python3-dev ffmpeg
11
+ pip install --upgrade setuptools wheel
12
+ pip install pip==24.1
13
+ pip install -r requirements.txt
14
+ apt-get update
15
+
16
+ # Run Applio
17
+ run-applio:
18
+ python app.py --share
19
+
20
+ # Run Tensorboard
21
+ run-tensorboard:
22
+ python core.py tensorboard
docker-compose.yaml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: '1'
2
+
3
+ services:
4
+ applio:
5
+ build:
6
+ context: ./
7
+ dockerfile: Dockerfile
8
+ ports:
9
+ - "6969"
10
+ deploy:
11
+ resources:
12
+ reservations:
13
+ devices:
14
+ - driver: nvidia
15
+ count: 1
16
+ capabilities: [gpu]