FROM python:3.9 ENV HF_REPO_ID=LocalResearchGroup/smollm2-135m-20250224_023514 RUN useradd -m -u 1000 aim_user # Switch to the "aim_user" user USER aim_user # Set home to the user's home directory ENV HOME=/home/aim_user \ PATH=/home/aim_user/.local/bin:$PATH # Set the working directory to the user's home directory WORKDIR $HOME # install the `aim` package on the latest version RUN pip install aim huggingface-hub #RUN aim telemetry off ENTRYPOINT ["/bin/sh", "-c"] # COPY aim_repo.tar.gz . # RUN tar xvzf aim_repo.tar.gz RUN python3 -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='${HF_REPO_ID}', allow_patterns='.aim/**')" # have to run `aim init` in the directory that stores aim data for # otherwise `aim up` will prompt for confirmation to create the directory itself. # We run aim listening on 0.0.0.0 to expose all ports. Also, we run # using `--dev` to print verbose logs. Port 43800 is the default port of # `aim up` but explicit is better than implicit. CMD ["aim up --host 0.0.0.0 --port 7860 --workers 2"]