Spaces:
Paused
Paused
File size: 511 Bytes
15c9046 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# Use the official Python image from the Docker Hub
FROM python:3.9
# Create a user and set the working directory
RUN useradd -m -u 1000 user
WORKDIR /app
# Copy the requirements file and install dependencies
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Copy the application code
COPY --chown=user . /app
# Set the entry point to run the FastAPI server
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|