Spaces:
Sleeping
Sleeping
File size: 550 Bytes
4ad1370 794411d df60135 4ad1370 cadb702 df60135 4ad1370 1044bee 4ad1370 1044bee df60135 794411d df60135 794411d df60135 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# Use a Python base image
FROM python:3.11-slim
# Create user and working directory
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
# Copy and install dependencies
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy app files
COPY --chown=user . /app
# Expose the desired port
EXPOSE 7860
# Launch app with uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--reload"] |