# build with: docker build . --tag sctg/roco-idefics3:0.0.2 --tag sctg/roco-idefics3:latest --push | |
FROM ovhcom/ai-training-pytorch:latest | |
RUN source /workspace/.miniconda3/bin/activate \ | |
&& pip install -U "safetensors>=0.4.5" bitsandbytes\ | |
&& pip install -U git+https://github.com/huggingface/transformers.git\ | |
&& pip install huggingface_hub accelerate datasets peft\ | |
&& pip install -U Pillow | |
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 source /workspace/.miniconda3/bin/activate \ | |
&& mkdir -p /workspace/data \ | |
&& python /preload.py | |