demo-01 / Dockerfile
sonic-868's picture
Update Dockerfile
a8b96c6
raw
history blame
582 Bytes
# Use the official Python base image
FROM python:3.9-slim
# Set the working directory inside the container
WORKDIR /app
# Copy the requirements file to the container
COPY requirements.txt .
# Install the project dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the application files to the container
COPY app.py .
COPY static static
# Expose the port on which the application will run
EXPOSE 7860
# Set the entry point command to run the FastAPI application
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--reload", "--workers", "1"]