FROM pytorch/pytorch:2.3.1-cuda11.8-cudnn8-runtime | |
# Set working directory | |
WORKDIR /mapper | |
# Install dependencies | |
RUN apt-get update && apt-get install -y \ | |
git \ | |
wget \ | |
unzip \ | |
vim \ | |
ffmpeg \ | |
libsm6 \ | |
libxext6 | |
RUN pip install --no-cache-dir gradio[oauth]==4.36.1 "uvicorn>=0.14.0" spaces | |
COPY . /mapper | |
# Install Python dependencies | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Get Weights | |
RUN bash get_weights.sh | |
# Clear APT and pip cache | |
RUN apt-get clean && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/pip-reqs | |
# Start the app | |
CMD ["python", "app.py"] |