Lesterchia1's picture
Create Dockerfile
25b93ac verified
raw
history blame contribute delete
627 Bytes
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
git-lfs \
ffmpeg \
libsm6 \
libxext6 \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies with build tools
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
# Copy requirements first for better caching
COPY requirements.txt .
# Install Python packages with specific versions that have wheels
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Expose port
EXPOSE 7860
# Run the application
CMD ["python", "app.py"]