File size: 543 Bytes
8d1b3ab |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# Use an official Python runtime as a base image
FROM python:3.11-slim
# Set environment variables
ENV PYTHONUNBUFFERED=1
# Create and set the working directory
WORKDIR /app
# Copy the requirements.txt file into the container at /app
COPY requirements.txt /app/
# Install any needed dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the current directory contents into the container at /app
COPY . /app/
# Expose the port FastAPI will run on
EXPOSE 7860
# Run the application using uvicorn
CMD ["python", "app.py"]
|