Spaces:
Running

kpak / Dockerfile
msentimental's picture
Update Dockerfile
c70770c verified
Raw History Blame Contribute Delete
751 Bytes
FROM python:3.9-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first
COPY requirements.txt .
# Install Python dependencies - including gunicorn explicitly
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir flask flask-socketio flask-bcrypt pyjwt python-socketio eventlet gunicorn && \
pip install --no-cache-dir -r requirements.txt
RUN mkdir -p /data
# Copy the rest of the application
COPY . .
# Make sure templates folder exists
RUN mkdir -p templates
# Expose the port
EXPOSE 7860
# Use python directly instead of gunicorn (simpler, more reliable)
CMD ["python", "app.py"]