|
FROM runpod/pytorch:2.2.1-py3.10-cuda12.1.1-devel-ubuntu22.04 |
|
WORKDIR /content |
|
ENV PATH="/home/camenduru/.local/bin:${PATH}" |
|
|
|
RUN adduser --disabled-password --gecos '' camenduru && \ |
|
adduser camenduru sudo && \ |
|
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \ |
|
chown -R camenduru:camenduru /content && \ |
|
chmod -R 777 /content && \ |
|
chown -R camenduru:camenduru /home && \ |
|
chmod -R 777 /home && \ |
|
apt update -y && add-apt-repository -y ppa:git-core/ppa && apt update -y && apt install -y aria2 git git-lfs unzip ffmpeg |
|
|
|
USER camenduru |
|
|
|
RUN pip install -q opencv-python imageio imageio-ffmpeg ffmpeg-python av runpod \ |
|
modelscope==1.18.0 addict==2.4.0 datasets==2.21.0 oss2==2.19.0 simplejson==3.19.3 timm==1.0.9 sortedcontainers==2.4.0 && \ |
|
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/cv_ddcolor_image-colorization/raw/main/configuration.json -d /content/model -o configuration.json && \ |
|
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/cv_ddcolor_image-colorization/resolve/main/pytorch_model.pt -d /content/model -o pytorch_model.pt |
|
|
|
COPY ./worker_runpod.py /content/worker_runpod.py |
|
WORKDIR /content |
|
CMD python worker_runpod.py |