hostserver2 / Dockerfile
abdullahalioo's picture
Update Dockerfile
6b40661 verified
raw
history blame
506 Bytes
FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies early for caching
COPY requirements.txt .
RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Expose port (optional)
EXPOSE 7860
# Run Uvicorn server
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]