Spaces:
Sleeping
Sleeping
File size: 594 Bytes
068b6e0 6c34333 068b6e0 6c34333 068b6e0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | FROM python:3.9-slim
WORKDIR /app
# Install dependencies first (for faster caching)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy only the necessary code and weights
COPY gui/ ./gui/
COPY CNN/ ./CNN/
COPY EBMs/ ./EBMs/
COPY GAN/ ./GAN/
COPY VAE/ ./VAE/
# Copy the pre-generated images and metrics
COPY results/ ./results/
# Copy the model weights needed for live inference
COPY *.pth ./
# Hugging Face Spaces require web apps to run on port 7860
EXPOSE 7860
# Run FastAPI
CMD ["uvicorn", "gui.backend.main:app", "--host", "0.0.0.0", "--port", "7860"]
|