File size: 590 Bytes
ca033f7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # 1. Start with a lightweight version of Python
FROM python:3.10-slim
# 2. Set the working directory inside the container
WORKDIR /app
# 3. Copy your requirements file into the container
COPY requirements.txt .
# 4. Install the Python packages
# (We use --no-cache-dir to keep the container size small!)
RUN pip install --no-cache-dir -r requirements.txt
# 5. Copy the rest of your ml_services code into the container
COPY . .
# 6. Expose the port FastAPI will run on
EXPOSE 7860
# 7. The command to start your server
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |