Update Dockerfile
Browse files- Dockerfile +10 -11
Dockerfile
CHANGED
|
@@ -1,23 +1,22 @@
|
|
| 1 |
-
|
| 2 |
|
| 3 |
-
|
| 4 |
python3.11 \
|
| 5 |
python3-pip \
|
| 6 |
ffmpeg \
|
| 7 |
libsndfile1 \
|
|
|
|
| 8 |
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
-
|
| 11 |
|
| 12 |
-
|
| 13 |
|
| 14 |
-
|
| 15 |
-
|
| 16 |
|
| 17 |
-
|
| 18 |
|
| 19 |
-
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app", "--workers", "1", "--threads", "2", "--timeout", "600"]
|
|
|
|
| 1 |
+
from nvidia/cuda:12.1.1-runtime-ubuntu22.04
|
| 2 |
|
| 3 |
+
run apt-get update && apt-get install -y \
|
| 4 |
python3.11 \
|
| 5 |
python3-pip \
|
| 6 |
ffmpeg \
|
| 7 |
libsndfile1 \
|
| 8 |
+
git \
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
+
workdir /app
|
| 12 |
|
| 13 |
+
copy requirements.txt .
|
| 14 |
|
| 15 |
+
run pip install --no-cache-dir torch torchaudio --index-url https://download.pytorch.org/whl/cu121
|
| 16 |
+
run pip install --no-cache-dir -r requirements.txt
|
| 17 |
|
| 18 |
+
copy . .
|
| 19 |
|
| 20 |
+
expose 7860
|
| 21 |
|
| 22 |
+
cmd ["gunicorn", "--bind", "0.0.0.0:7860", "app:app", "--workers", "1", "--threads", "4", "--timeout", "600"]
|
|
|
|
|
|