Sign inSign up

iankoulski/do-hf

By iankoulski

•Updated 4 months ago

Run the HuggingFace CLI in a container using the do-framework

Image
0

635

iankoulski/do-hf repository overview

⁠do-hf

Run the HuggingFace CLI hf⁠ in a container using the do-framework⁠

⁠Container project description

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.

⁠Usage

⁠Locally

docker run -it --rm iankoulski/do-hf bash

⁠On Kubernetes

kubectl run -ti --rm do-hf --image iankoulski/do-hf -- bash

⁠In project

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 image
  • test.sh - run container unit tests
  • push.sh - push the container image to a registry
  • pull.sh - pull the container image from a registry
  • run.sh [cmd] - run the container, passing an argument overrides the default command
  • status.sh - show container status - running, exited, etc.
  • logs.sh - tail container logs
  • exec.sh [cmd] - open a shell or execute a specified command in the running container

Execute ./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.

Tag summary

Content type

Image

Digest

sha256:f3f460b4e…

Size

463.1 MB

Last updated

4 months ago

docker pull iankoulski/do-hf