ai-virtual-try-on / Dockerfile
tonyassi's picture
Deploy Ai fitting room (FastAPI + Docker)
16babf7 verified
raw
history blame contribute delete
432 Bytes
FROM python:3.11-slim
# HF Spaces docker SDK expects the app to listen on $PORT (default 7860)
ENV PORT=7860 \
PYTHONUNBUFFERED=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1
WORKDIR /app
# Install Python deps first for layer caching
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application source
COPY . .
EXPOSE 7860
CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port ${PORT:-7860}"]