Spaces:
Paused
Paused
File size: 540 Bytes
6489a64 4267464 f8b8283 6489a64 4267464 f8b8283 6489a64 f8b8283 6489a64 4267464 f8b8283 6489a64 4267464 f8b8283 6489a64 4267464 |
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 |
# Use official Python image
FROM python:3.10-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y gcc
# Copy requirements and install first (for better layer caching)
COPY requirements.txt .
RUN pip install --upgrade pip && \
pip install -r requirements.txt
# Copy the rest of the code
COPY . .
# Expose FastAPI default port
EXPOSE 7860
# Command to run the app
CMD ["python", "main.py"]
|