shockmap-api / Dockerfile
Dhruva P Gowda
Update default Docker port to 7860 for Hugging Face Spaces compatibility
100c6cd
Raw
History Blame Contribute Delete
572 Bytes
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y gcc g++ && rm -rf /var/lib/apt/lists/*
# Copy the entire project first to avoid path resolution issues in Render's builder
COPY . /app
# Install dependencies from the copied backend folder
RUN pip install --no-cache-dir -r backend/requirements.txt
# Set environment variables (7860 is required by Hugging Face Spaces by default)
ENV PORT=7860
# Run the unified backend application
CMD ["sh", "-c", "uvicorn backend.app.main:app --host 0.0.0.0 --port ${PORT}"]