talentpilot / Dockerfile
humza7656's picture
Upload 4 files
3525729 verified
raw
history blame contribute delete
610 Bytes
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /code
# Install system dependencies (only if needed)
RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Copy full project
COPY . .
# Hugging Face requires port 7860
EXPOSE 7860
# Since main.py is in root:
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]