UI-layout-optimizer / Dockerfile
Kolaps27's picture
chore: optimize Dockerfile build cache and add pre-submission script
9d6c5d1
raw
history blame contribute delete
548 Bytes
# Use an official Python 3.10 runtime as a parent image
FROM python:3.10-slim
# Set the working directory in the container
WORKDIR /app
# Cache dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the current directory contents into the container at /app
COPY . /app
# Expose port (HF Spaces uses 7860)
EXPOSE 7860
# Environment variable for the HF token (can be overridden at runtime)
ENV HF_TOKEN=""
# Run the FastAPI server
CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]