File size: 880 Bytes
d74d3fa |
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 28 29 30 31 32 33 34 35 |
FROM nvidia/cuda:12.3.2-cudnn9-devel-ubuntu22.04
# Install Python 3.11 and system dependencies
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y python3.11 python3.11-pip python3.11-dev && \
rm -rf /var/lib/apt/lists/*
# Set up user (HF Spaces requirement)
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
# Copy application files
COPY --chown=user . $HOME/app
# Install Python dependencies WITHOUT mcp
RUN python3.11 -m pip install --no-cache-dir \
gradio==5.49.1 \
uvicorn>=0.14.0 \
spaces
# Install your custom requirements
RUN python3.11 -m pip install --no-cache-dir -r requirements.txt
# Expose Gradio port
EXPOSE 7860
# Run the app
CMD ["python3.11", "app.py"] |