Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +8 -8
Dockerfile
CHANGED
|
@@ -2,11 +2,11 @@ FROM python:3.9-slim-bullseye
|
|
| 2 |
|
| 3 |
# Environment
|
| 4 |
ENV PYTHONUNBUFFERED=1 \
|
| 5 |
-
PORT=7860
|
| 6 |
|
| 7 |
WORKDIR /app
|
| 8 |
|
| 9 |
-
# Install system dependencies
|
| 10 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 11 |
ffmpeg git curl \
|
| 12 |
libgl1-mesa-glx libglib2.0-0 libsm6 libxrender1 libxext6 \
|
|
@@ -17,17 +17,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 17 |
RUN pip install --upgrade pip
|
| 18 |
RUN pip install numpy==1.21.6
|
| 19 |
|
| 20 |
-
#
|
| 21 |
-
COPY requirements.txt .
|
| 22 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 23 |
|
| 24 |
-
# Create necessary directories
|
| 25 |
-
RUN mkdir -p
|
| 26 |
-
|
| 27 |
|
| 28 |
# Copy application code
|
| 29 |
COPY . .
|
| 30 |
|
| 31 |
EXPOSE 7860
|
| 32 |
|
| 33 |
-
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
|
|
|
|
| 2 |
|
| 3 |
# Environment
|
| 4 |
ENV PYTHONUNBUFFERED=1 \
|
| 5 |
+
PORT=7860
|
| 6 |
|
| 7 |
WORKDIR /app
|
| 8 |
|
| 9 |
+
# Install system dependencies
|
| 10 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 11 |
ffmpeg git curl \
|
| 12 |
libgl1-mesa-glx libglib2.0-0 libsm6 libxrender1 libxext6 \
|
|
|
|
| 17 |
RUN pip install --upgrade pip
|
| 18 |
RUN pip install numpy==1.21.6
|
| 19 |
|
| 20 |
+
# Install Gunicorn and app dependencies
|
| 21 |
+
COPY requirements.txt .
|
| 22 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 23 |
|
| 24 |
+
# Create necessary directories
|
| 25 |
+
RUN mkdir -p cache uploads results checkpoints temp \
|
| 26 |
+
&& chmod -R 777 cache uploads results checkpoints temp
|
| 27 |
|
| 28 |
# Copy application code
|
| 29 |
COPY . .
|
| 30 |
|
| 31 |
EXPOSE 7860
|
| 32 |
|
| 33 |
+
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
|