File size: 424 Bytes
95be1c5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
FROM python:3.10-slim
# Prevent Python from writing .pyc files and using buffered output
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Set working directory
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --upgrade pip && pip install -r requirements.txt
# Copy source code
COPY main.py .
# Run the app with Uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|