glaucoma_backend_2 / Dockerfile
dhruv2842's picture
Update Dockerfile
7c4a67e verified
# 1️⃣ Use an official slim Python image
FROM python:3.9-slim
# 2️⃣ Set working directory
WORKDIR /app
# 3️⃣ Install required system dependencies (fixes libGL and libgthread errors)
RUN apt-get update && \
apt-get install -y libgl1-mesa-glx libglib2.0-0 && \
rm -rf /var/lib/apt/lists/*
# 4️⃣ Copy requirements
COPY requirements.txt .
# 5️⃣ Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# 6️⃣ Copy all files from the root of your project
COPY . .
# 7️⃣ Expose the port
EXPOSE 7860
# 8️⃣ Command to run the app
CMD ["python", "app.py"]