foundation-model-stack / fms-hf-tuning

🚀 Collection of tuning recipes with HuggingFace SFTTrainer and PyTorch FSDP.
Apache License 2.0
28 stars 48 forks source link

build: Jim and Alex dev image #388

Open jbusche opened 3 weeks ago

jbusche commented 3 weeks ago

Description of the change

This adds a dev stage to the Dockerfile which, when used with --target dev enables dnf, yum, git and the fms-hf-tuning dev tools.

Related issue number

Closes #1147

How to verify the PR

I built it two ways -

  1. First with the entire build that would generate the regular release image:

    docker build --progress=plain -t fms-hf-tuning:jim_alex_dev_image2 . -f build/Dockerfile

    1.2. I did a quick twistlock scan of this image, and it continues to look good. 1.3. I used this image to run a quick pytorchjob and it looked good. 1.4 TBD - Still need to test on a real GPU

  2. I built it with the dev target like this:

    docker build --target dev --progress=plain -t fms-hf-tuning:realdev_image . -f build/Dockerfile

    2.2 I did a quick twistlock scan of this image, and it finds vulnerabilities of the python, which is to be expected. (This is why we have a slimmed down release build, to avoid these vulnerabilities) 2.3 I got inside the image and it has the requested items that @anhuong was asking for:

    podman run --rm -it localhost/fms-hf-tuning:realdev_image /bin/bash

    and then:

    [tuning@28888908315c app]$ which git
    /bin/git
    [tuning@28888908315c app]$ which dnf
    /bin/dnf
    [tuning@28888908315c app]$ which yum
    /bin/yum

    as well as the dev packages:

    
    pip list |grep pack
    packaging                24.1

pip list |grep ninja ninja 1.11.1.1

pip list |grep scikit scikit-learn 1.5.2

pip list |grep boto boto3 1.35.55 botocore 1.35.55


### Was the PR tested
In progress

<!-- Describe how PR was tested -->
- [ ] I have added >=1 unit test(s) for every new method I have added.
- [ ] I have ensured all unit tests pass
github-actions[bot] commented 3 weeks ago

Thanks for making a pull request! 😃 One of the maintainers will review and advise on the next steps.