-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃殌 Dockerize dalai #39
base: main
Are you sure you want to change the base?
Conversation
rename home to llamaPath add usePyEnv to specify if we want use virtualization add config to set custom model folder, with that we keep clean llama.cpp git directory check python path before use it. other minor changes
This is awesome! Will have to try this out! |
Good work on this. It worked great, minus some small issues. The |
great work @bernatvadell! I'm using Docker Desktop on windows and the final step was crashing for me.
clearing it with |
Interesting, this failed to build for me. Error:
Fixed locally by adding a chown above the workdir, eg:
|
ARG NODE_PACKAGE=node-v$NODE_VERSION-linux-x64 | ||
ARG NODE_HOME=/opt/$NODE_PACKAGE | ||
|
||
ENV LLAMA_MODEL=7B |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any Reasons you are Hardcoding here the Model 7B?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not hardcoded, you can change during runtime passing env.
docker run -e LLAMA_MODEL=7B ...
by the default we're using 7B (smallest)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But then you need to add this to the docker-compose.yaml file too. At this moment, if you just say docker-compose up
it uses the 7B Model
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is possible that during the last merge, that changed the api something will stop working. I review it and I tell you things.
- ./models:/home/dalai/models | ||
ports: | ||
- 3000:3000 | ||
# command: tail -f /dev/null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add here again command: yarn just:run $LLAMA_MODEL
?
When I run docker compose up
the env variable in docker-compose.yaml is ignored and the hardcoded one from Dockerfile is used
It would be really nice if the instructions for running this could also work on Fedora, which uses Podman. Compatibility of the container image should not be a problem, but the current directions rely on Docker Compose, which is not well supported by Podman. |
I've been playing around with this repository and dockerized the app.
During the process I have refactored a few things. Always respecting the original values to avoid breaking-changes.
If you are interested in maintaining support for this feature, I would recommend publishing the image on dockerhub.
I've also included a docker-compose to ease initial startup and a script in the package.json
The only requirement is to have Docker Engine (or Docker Desktop) installed.
and execute
yarn run:docker
ornpm run run:docker
if the image were published in dockerhub it would be as simple as running:
basic:
docker run -p 3000:3000 cocktailpeanut/dalai
specifing model:
docker run -p 3000:3000 -e LLAMA_MODEL=7B cocktailpeanut/dalai
mapping volume models to persist:
docker run -p 3000:3000 -v models:/home/dalai/models cocktailpeanut/dalai