Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +39 -39
Dockerfile
CHANGED
|
@@ -1,39 +1,39 @@
|
|
| 1 |
-
FROM python:3.11-slim
|
| 2 |
-
|
| 3 |
-
# Install system dependencies including ffmpeg
|
| 4 |
-
RUN apt-get update && apt-get install -y \
|
| 5 |
-
ffmpeg \
|
| 6 |
-
libsm6 \
|
| 7 |
-
libxext6 \
|
| 8 |
-
libxrender-dev \
|
| 9 |
-
libgomp1 \
|
| 10 |
-
libgl1
|
| 11 |
-
git \
|
| 12 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
-
|
| 14 |
-
# Set working directory
|
| 15 |
-
WORKDIR /app
|
| 16 |
-
|
| 17 |
-
# Copy requirements
|
| 18 |
-
COPY requirements.txt .
|
| 19 |
-
|
| 20 |
-
# Install Python dependencies
|
| 21 |
-
RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
|
| 22 |
-
pip install --no-cache-dir -r requirements.txt
|
| 23 |
-
|
| 24 |
-
# Copy application files
|
| 25 |
-
COPY . .
|
| 26 |
-
|
| 27 |
-
# Create necessary directories
|
| 28 |
-
RUN mkdir -p downloads user_tokens /tmp/flask_session temp_audio
|
| 29 |
-
|
| 30 |
-
# Set environment variables
|
| 31 |
-
ENV PYTHONUNBUFFERED=1
|
| 32 |
-
ENV ENVIRONMENT=production
|
| 33 |
-
ENV PORT=7860
|
| 34 |
-
|
| 35 |
-
# Expose port
|
| 36 |
-
EXPOSE 7860
|
| 37 |
-
|
| 38 |
-
# Run the application
|
| 39 |
-
CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860", "--workers", "2", "--timeout", "600", "--log-level", "info"]
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
+
|
| 3 |
+
# Install system dependencies including ffmpeg
|
| 4 |
+
RUN apt-get update && apt-get install -y \
|
| 5 |
+
ffmpeg \
|
| 6 |
+
libsm6 \
|
| 7 |
+
libxext6 \
|
| 8 |
+
libxrender-dev \
|
| 9 |
+
libgomp1 \
|
| 10 |
+
libgl1 \
|
| 11 |
+
git \
|
| 12 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
+
|
| 14 |
+
# Set working directory
|
| 15 |
+
WORKDIR /app
|
| 16 |
+
|
| 17 |
+
# Copy requirements
|
| 18 |
+
COPY requirements.txt .
|
| 19 |
+
|
| 20 |
+
# Install Python dependencies
|
| 21 |
+
RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
|
| 22 |
+
pip install --no-cache-dir -r requirements.txt
|
| 23 |
+
|
| 24 |
+
# Copy application files
|
| 25 |
+
COPY . .
|
| 26 |
+
|
| 27 |
+
# Create necessary directories
|
| 28 |
+
RUN mkdir -p downloads user_tokens /tmp/flask_session temp_audio
|
| 29 |
+
|
| 30 |
+
# Set environment variables
|
| 31 |
+
ENV PYTHONUNBUFFERED=1
|
| 32 |
+
ENV ENVIRONMENT=production
|
| 33 |
+
ENV PORT=7860
|
| 34 |
+
|
| 35 |
+
# Expose port
|
| 36 |
+
EXPOSE 7860
|
| 37 |
+
|
| 38 |
+
# Run the application
|
| 39 |
+
CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860", "--workers", "2", "--timeout", "600", "--log-level", "info"]
|