Spaces:
Runtime error
Runtime error
Add root Dockerfile for Hugging Face Spaces
Browse files12345678910111213141516171819202122232425262728293031323334FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ PIP_NO_CACHE_DIR=1 \ PORT=7860
# Hugging Face runs containers under user ID 1000. Set up user.RUN useradd -m -u 1000 userWORKDIR /home/user/app
RUN apt-get update \ && apt-get install -y --no-install-recommends build-essential curl \ && rm -rf /var/lib/apt/lists/*
# Copy python packaging configuration & source code from services/apiCOPY services/api/pyproject.toml ./COPY services/api/app ./appRUN pip install .
# Copy database migration toolsCOPY services/api/alembic.ini ./COPY services/api/alembic ./alembicCOPY services/api/scripts ./scriptsRUN chmod +x ./scripts/start.sh
# Change ownership of app directory to user 1000RUN chown -R user:user /home/user/app
USER userEXPOSE 7860
# Start script automatically binds to PORT 7860 injected by Hugging FaceCMD ["./scripts/start.sh"]DockerfileAdded+34