sql-debug-env / Dockerfile
aakashdandekar's picture
Initial commit of SQL Debug Environment
be62603
Raw History Blame Contribute Delete
682 Bytes
FROM python:3.11-slim
WORKDIR /app
# Hugging Face Spaces require a non-root user
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
# Install dependencies first (layer cache)
COPY --chown=user server/requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY --chown=user . .
# Optional: enable the built-in web debug interface
# Set to "true" to activate /web route
ENV ENABLE_WEB_INTERFACE=false
# HF Spaces maps external port 7860 → internal 7860;
# local Docker runs typically use 8000.
EXPOSE 7860
CMD ["python", "-m", "uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]