File size: 687 Bytes
e39349b 9b9354c c7b1ae2 fa56da3 c7b1ae2 6b1b933 e39349b 6b1b933 e39349b 6b1b933 c91b41e 1d2b7ef fa56da3 e39349b aa5a346 e39349b c7b1ae2 e39349b 63334ed e39349b 6b1b933 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# Use the official Python image from the Docker Hub
FROM python:3.11-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Set work directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Copy the application code
COPY . .
# Expose the port FastAPI is running on
EXPOSE 8000
# Define the default command to run the application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] |