petpal / Dockerfile
priaansh's picture
Update Dockerfile
41103cf verified
raw
history blame contribute delete
501 Bytes
FROM python:3.10-slim
WORKDIR /code
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application
COPY app.py .
# Set environment and expose port
ENV PYTHONUNBUFFERED=1
EXPOSE 7860
# Start Uvicorn server
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]