Spaces:
Sleeping
Sleeping
File size: 435 Bytes
20f4f84 55bf66b 20f4f84 55bf66b 20f4f84 55bf66b 20f4f84 55bf66b 20f4f84 55bf66b 20f4f84 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # Use official Python image
FROM python:3.9
# Create non-root user
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
# Set working dir
WORKDIR /app
# Install requirements
COPY --chown=user requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy project files
COPY --chown=user . .
# Run FastAPI app
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"] |