HistoPath / Dockerfile
ryding's picture
Create Dockerfile
d74d3fa verified
raw
history blame contribute delete
880 Bytes
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"]