Spaces:
Paused
Paused
FROM python:3.10-alpine | |
# Set working directory | |
WORKDIR /code | |
# Install build dependencies first (because Alpine is minimal) | |
RUN apk add --no-cache --virtual .build-deps \ | |
gcc musl-dev libffi-dev make | |
# Install Python dependencies | |
COPY ./requirements.txt /code/requirements.txt | |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
# Copy app files | |
COPY . . | |
# Remove build dependencies to make final image lighter | |
RUN apk del .build-deps | |
# Command to run your app | |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |