aniverse / Dockerfile
Penguindrum920's picture
Upload 57 files
59eb043 verified
raw
history blame contribute delete
640 Bytes
# AniVerse Backend - Hugging Face Spaces Dockerfile
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
g++ \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for caching
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV PORT=7860
# Download data on startup and run server
CMD python setup_data.py && uvicorn main:app --host 0.0.0.0 --port 7860