Spaces:
Paused
Paused
File size: 554 Bytes
7760eb5 08606b0 7760eb5 08606b0 7760eb5 600e938 7760eb5 87d29a8 137e813 7760eb5 08606b0 7760eb5 1cdc160 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
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"]
|