Ai-code-editor / Dockerfile
Shantanupathak94's picture
on the ball
2df4952
# ╔══════════════════════════════════════════════════════════════════════╗
# β•‘ ETHRIX-FORGE β€” Dockerfile for Hugging Face Spaces β•‘
# β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
FROM python:3.11-slim
# HF Spaces required label
LABEL maintainer="Ethrix-Forge"
# Install git (required by GitPython for clone operations)
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install Python dependencies first (layer cache optimisation)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY main.py .
# HF Spaces runs on port 7860
EXPOSE 7860
# Run the FastAPI server
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "2"]