Created
July 8, 2024 23:43
-
-
Save sudomann/6b4996c2d730c9430259d84e7dddf7d5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
init_ensure_models: | |
image: alpine:latest | |
volumes: | |
- ./worker/models:/worker/models | |
entrypoint: > | |
/bin/sh -c " | |
if [ ! -f /worker/models/nlp/my_model.gguf ]; then | |
echo 'Downloading models...'; | |
mkdir -p /worker/models/nlp/ && | |
wget -O /worker/models/nlp/my_model.gguf http://path.to.huggingface/models/my_model.gguf; | |
fi; | |
echo 'Model download completed or already exists.'" | |
depends_on: | |
- condition: service_completed_successfully | |
worker: | |
... | |
volumes: | |
- ./worker/models:/worker/models | |
depends_on: | |
init_ensure_models: | |
condition: service_completed_successfully |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment