Spaces:
Sleeping
Sleeping
FROM python:3.8-slim | |
WORKDIR /app | |
ADD . /app | |
# Set up a new user named "user" with user ID 1000 | |
RUN useradd -m -u 1000 user | |
# Switch to the "user" user | |
USER user | |
# Set home to the user's home directory | |
RUN apt-get update && apt-get install -y libgomp1 | |
RUN pip install -r requirements.txt | |
# Start the FastAPI app on port 7860, the default port expected by Spaces | |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |