Spaces:
Sleeping
Sleeping
File size: 453 Bytes
e9a2c4c 359f62a e9a2c4c c11e0d4 359f62a e9a2c4c 09e24e5 359f62a e9a2c4c 359f62a f7821f2 359f62a f7821f2 e9a2c4c f7821f2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# Use official Python image as the base
FROM python:3.9-slim
# Set working directory
WORKDIR /app
# Copy requirements file and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
RUN useradd -m appuser
USER appuser
# Expose the FastAPI app port
EXPOSE 7860
# Run the application with Uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|