Update Dockerfile
Browse files- Dockerfile +21 -5
Dockerfile
CHANGED
|
@@ -2,9 +2,18 @@
|
|
| 2 |
FROM python:3.9.13
|
| 3 |
|
| 4 |
# Install system dependencies
|
| 5 |
-
RUN apt-get update && \
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
ffmpeg \
|
|
|
|
|
|
|
|
|
|
| 8 |
libgl1 \
|
| 9 |
&& apt-get clean \
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
|
@@ -13,10 +22,16 @@ RUN apt-get update && \
|
|
| 13 |
RUN useradd -m -u 1000 user
|
| 14 |
USER user
|
| 15 |
|
| 16 |
-
# Set environment variables
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
ENV HOME=/home/user \
|
| 18 |
PATH=/home/user/.local/bin:$PATH \
|
| 19 |
-
NUMBA_CACHE_DIR=/tmp/numba_cache
|
|
|
|
|
|
|
| 20 |
|
| 21 |
# Set working directory
|
| 22 |
WORKDIR $HOME/app
|
|
@@ -35,4 +50,5 @@ RUN pip install huggingface_hub && \
|
|
| 35 |
EXPOSE 7860
|
| 36 |
|
| 37 |
# Start the application with Gunicorn
|
| 38 |
-
CMD ["gunicorn", "-b", "0.0.0.0:7860", "--timeout", "300", "app:app"]
|
|
|
|
|
|
| 2 |
FROM python:3.9.13
|
| 3 |
|
| 4 |
# Install system dependencies
|
| 5 |
+
# RUN apt-get update && \
|
| 6 |
+
# apt-get install -y \
|
| 7 |
+
# ffmpeg \
|
| 8 |
+
# libgl1 \
|
| 9 |
+
# && apt-get clean \
|
| 10 |
+
# && rm -rf /var/lib/apt/lists/*
|
| 11 |
+
|
| 12 |
+
RUN apt-get update && apt-get install -y \
|
| 13 |
ffmpeg \
|
| 14 |
+
git \
|
| 15 |
+
curl \
|
| 16 |
+
wget \
|
| 17 |
libgl1 \
|
| 18 |
&& apt-get clean \
|
| 19 |
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
| 22 |
RUN useradd -m -u 1000 user
|
| 23 |
USER user
|
| 24 |
|
| 25 |
+
# # Set environment variables
|
| 26 |
+
# ENV HOME=/home/user \
|
| 27 |
+
# PATH=/home/user/.local/bin:$PATH \
|
| 28 |
+
# NUMBA_CACHE_DIR=/tmp/numba_cache
|
| 29 |
+
|
| 30 |
ENV HOME=/home/user \
|
| 31 |
PATH=/home/user/.local/bin:$PATH \
|
| 32 |
+
NUMBA_CACHE_DIR=/tmp/numba_cache \
|
| 33 |
+
NVIDIA_VISIBLE_DEVICES=all \
|
| 34 |
+
NVIDIA_DRIVER_CAPABILITIES=compute,utility
|
| 35 |
|
| 36 |
# Set working directory
|
| 37 |
WORKDIR $HOME/app
|
|
|
|
| 50 |
EXPOSE 7860
|
| 51 |
|
| 52 |
# Start the application with Gunicorn
|
| 53 |
+
# CMD ["gunicorn", "-b", "0.0.0.0:7860", "--timeout", "300", "app:app"]
|
| 54 |
+
CMD ["gunicorn", "-w", "2", "-k", "gevent", "-b", "0.0.0.0:7860", "--timeout", "600", "app:app"]
|