# build with: docker build . --tag sctg/roco-idefics3:0.0.4 --tag sctg/roco-idefics3:latest --push # run with # docker run --gpus all --user=42420:42420 -e HF_TOKEN=hf_TOKEN -it sctg/roco-idefics3:0.0.4 bash -i /start.sh hf_TOKEN FROM nvidia/cuda:11.6.1-devel-ubuntu20.04 # FROM nvidia/cuda:11.0.3-devel-ubuntu20.04 # RUN mkdir -p /workspace RUN /usr/sbin/addgroup --gid 42420 ovh RUN /usr/sbin/useradd -u 42420 --gid 42420 -m -d /workspace -s /bin/bash ovh RUN apt update -y && apt-get install -y curl git git-lfs screen COPY --chmod=777 start.sh /start.sh COPY learn.py /learn.py COPY preload.py /preload.py # Mandatory to run the jobs in rootless mode USER root RUN chown -R 42420:42420 /workspace USER 42420 RUN curl -L https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh > /workspace/miniconda.sh RUN /bin/bash /workspace/miniconda.sh -b -p /workspace/.miniconda3 RUN . /workspace/.miniconda3/bin/activate && conda init --all RUN . /workspace/.miniconda3/bin/activate \ && pip install -U "safetensors>=0.4.5" \ && pip install -U "https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-0.44.2.dev0-py3-none-manylinux_2_24_x86_64.whl" \ && pip install -U git+https://github.com/huggingface/transformers.git\ && pip install huggingface_hub[cli] accelerate datasets peft\ && pip install -U Pillow RUN . /workspace/.miniconda3/bin/activate && conda install -y jupyter # Mandatory to run the jobs in rootless mode # USER root # RUN chown -R 42420:42420 /workspace USER 42420 WORKDIR /workspace # RUN export HOME=/workspace && cd /workspace && . /workspace/.miniconda3/bin/activate \ # && mkdir -p /workspace/data \ # && python /preload.py