-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPU support in Docker, other Docker-related updates #1655
Conversation
@lukaboljevic : What I would do is similar except a minor change where I would install |
|
I agree with you, it should be this way as this is the correct path to the private_gpt folder. This line is present in Dockerfile.local and Dockerfile.local.gpu, so I tested your suggestion in both and everything works without issues. However, it for some reason seems to work even with just I will wait for the input from @imartinez to update, but yes, I agree with you. I'm also glad docker build and compose work for you. |
To address a NVIDIA GPU from a Docker Container the following Dockerfile config is working for me as well on Linux & Windows after fully installing the CUDA-Toolkit: Dockerfile.cuda
|
@dpedwards : With recent change in |
The main contribution of this PR is the addition of a new Dockerfile and docker compose file for running PrivateGPT on GPU in Docker. The command to run is simply
docker compose -f docker-compose-gpu.yaml up --build
. This should address issues like #1652, #1597, #1405.The PR also proposes some changes based on #1428:
entrypoint.sh
script. Here, the user can specify the model, tokenizer, prompt style and embedding model through environment variables, and then those are automatically downloaded using the setup script.settings-docker.yaml
, and update default Mistral model to v0.2 from v0.1USER worker
as it seems to have caused a segfault on Mac (can't test unfortunately, as I don't have a Mac)I feel like having the
entrypoint.sh
script and simply runningdocker compose up
is way simpler and more transparent than the current (and not very well documented) approach of runningdocker compose run --rm --entrypoint="bash -c '[ -f scripts/setup ] && scripts/setup'" private-gpt
. The script also allows the user to more easily and directly choose model, tokenizer, prompt style and embedding model. The current approach involves creating a newsettings-FOO.yaml
file, and including FOO as a new profile in the corresponding docker compose file. This isn't bad at all, it just takes a while to find through the documentation, and may require a few attempts and browsing through issues like #1579 and #1573 before getting it to run.Whatever your stance is on the entrypoint script, the documentation needs to be updated to tell the user as directly as possible what is the correct way to run and configure PrivateGPT in Docker. One shouldn't have to dig deep in the documentation and issues to look for something that already exists and works. I would really like to hear your opinion on this, so we can discuss on how exactly to update it.
In any case, I'm open for any comments and suggestions, and I hope you find this PR useful.
Edit: I ran
make test
andmake check
- 30 tests passed with 23 warnings, while make check fixed some files which I did not edit.Edit 08.03.2024.: Closed in favour of #1690.