RetinaScan / Dockerfile
GOWREESH M G
Update Dockerfile
dd5ff3e verified
Raw
History Blame Contribute Delete
814 Bytes
# Use Python 3.9
FROM python:3.9-slim
# Set working directory
WORKDIR /app
# Install system dependencies
# FIXED: Replaced 'libgl1-mesa-glx' with 'libgl1' for newer Debian versions
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install them
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Create the upload directory to prevent permission errors
RUN mkdir -p uploads && chmod 777 uploads
# Create the dataset directory structure if it doesn't exist
RUN mkdir -p static/dataset/colored_images
# Expose the port Hugging Face uses
EXPOSE 7860
# Run the application using Gunicorn
CMD ["gunicorn", "-b", "0.0.0.0:7860", "--timeout", "120", "app:app"]