Spaces:
Runtime error
Runtime error
File size: 584 Bytes
0f9d87c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # Use an official lightweight Python/CUDA image
FROM nvidia/cuda:12.1.1-runtime-ubuntu22.04
# Install Python and pip
RUN apt-get update && apt-get install -y python3-pip python3-dev && rm -rf /var/lib/apt/lists/*
# Set the working directory
WORKDIR /app
# Copy the requirements and install them
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt
# Copy your application code
COPY app.py .
# Expose the Hugging Face Space port
EXPOSE 7860
# Command to run the FastAPI server using Uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |