Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +1 -9
Dockerfile
CHANGED
|
@@ -1,15 +1,12 @@
|
|
| 1 |
-
FROM python:3.9-slim
|
| 2 |
|
| 3 |
-
# Environment config
|
| 4 |
ENV PYTHONDONTWRITEBYTECODE=1 \
|
| 5 |
PYTHONUNBUFFERED=1 \
|
| 6 |
PORT=7860 \
|
| 7 |
LLVM_CONFIG=/usr/lib/llvm-10/bin/llvm-config
|
| 8 |
|
| 9 |
-
# Working directory
|
| 10 |
WORKDIR /app
|
| 11 |
|
| 12 |
-
# Install system dependencies including LLVM 10
|
| 13 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 14 |
ffmpeg \
|
| 15 |
git \
|
|
@@ -24,19 +21,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 24 |
llvm-10-dev \
|
| 25 |
&& rm -rf /var/lib/apt/lists/*
|
| 26 |
|
| 27 |
-
# Upgrade pip and install numpy early (needed for numba)
|
| 28 |
RUN pip install --upgrade pip
|
| 29 |
RUN pip install numpy==1.21.6
|
| 30 |
|
| 31 |
-
# Copy requirements and install Python dependencies
|
| 32 |
COPY requirements.txt .
|
| 33 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 34 |
|
| 35 |
-
# Copy app files
|
| 36 |
COPY . .
|
| 37 |
|
| 38 |
-
# Expose port
|
| 39 |
EXPOSE 7860
|
| 40 |
|
| 41 |
-
# Run app with Gunicorn
|
| 42 |
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
|
|
|
|
| 1 |
+
FROM python:3.9-slim-bullseye
|
| 2 |
|
|
|
|
| 3 |
ENV PYTHONDONTWRITEBYTECODE=1 \
|
| 4 |
PYTHONUNBUFFERED=1 \
|
| 5 |
PORT=7860 \
|
| 6 |
LLVM_CONFIG=/usr/lib/llvm-10/bin/llvm-config
|
| 7 |
|
|
|
|
| 8 |
WORKDIR /app
|
| 9 |
|
|
|
|
| 10 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 11 |
ffmpeg \
|
| 12 |
git \
|
|
|
|
| 21 |
llvm-10-dev \
|
| 22 |
&& rm -rf /var/lib/apt/lists/*
|
| 23 |
|
|
|
|
| 24 |
RUN pip install --upgrade pip
|
| 25 |
RUN pip install numpy==1.21.6
|
| 26 |
|
|
|
|
| 27 |
COPY requirements.txt .
|
| 28 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 29 |
|
|
|
|
| 30 |
COPY . .
|
| 31 |
|
|
|
|
| 32 |
EXPOSE 7860
|
| 33 |
|
|
|
|
| 34 |
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
|