nnun / Dockerfile
lukiod's picture
Update Dockerfile
cac15fa verified
raw
history blame contribute delete
788 Bytes
# Base image with PyTorch and CUDA (adjust to CPU image if needed)
FROM pytorch/pytorch:2.1.0-cuda11.8-cudnn8-runtime
# Install system dependencies
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
ffmpeg \
git \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy your app code and model
COPY app.py .
COPY requirements.txt .
COPY nnunet_model/ /app/nnunet_model/
# Install Python dependencies
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# Clone nnU-Net v2 and install it properly
RUN git clone -b nnunetv2 https://github.com/MIC-DKFZ/nnUNet.git
RUN pip install -e ./nnUNet
# Expose port
EXPOSE 7860
# Launch app
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]