Run the HuggingFace CLI in a container using the do-framework
635
Run the HuggingFace CLI hf in a container using the do-framework
This is a Depend on Docker project which comes operational out of the box and is configured with reasonable defaults, which can be customized as needed.
docker run -it --rm iankoulski/do-hf bash
kubectl run -ti --rm do-hf --image iankoulski/do-hf -- bash
git clone https://github.com/iankoulski/do-hf
The project contains the following scripts:
config.sh - open the configuration file .env in an editor so the project can be customized. Set TO to docker or kubernetes.build.sh - build the container imagetest.sh - run container unit testspush.sh - push the container image to a registrypull.sh - pull the container image from a registryrun.sh [cmd] - run the container, passing an argument overrides the default commandstatus.sh - show container status - running, exited, etc.logs.sh - tail container logsexec.sh [cmd] - open a shell or execute a specified command in the running containerExecute ./config.sh, then ./build.sh, then ./run.sh, then ./exec.sh to open your first do-hf shell.
Once inside the do-hf shell, you can execute run any desired hf command, or run ./config.sh to set a model name and a destination path, then run ./model-download.sh to download the model weights from HuggingFace.
Content type
Image
Digest
sha256:f3f460b4e…
Size
463.1 MB
Last updated
4 months ago
docker pull iankoulski/do-hf