You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+44-13
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,53 @@
1
-
# Text Generation Webui (Podman)
1
+
# Text Generation Webui (Podman+Docker)
2
2
3
-
This repository puts [oobabooga/text-generation-webui](https://github.com/oobabooga/text-generation-webui) into a podman container. For full usage information, see the README.md in that repository [and the wiki](https://github.com/oobabooga/text-generation-webui/wiki).
3
+
This repository puts [oobabooga/text-generation-webui](https://github.com/oobabooga/text-generation-webui) into a container. For full usage information, see the README.md in that repository [and the wiki](https://github.com/oobabooga/text-generation-webui/wiki).
4
4
5
-
This docker file automatically builds GPTQ-for-LLaMa so you can use 4bit LLaMa models.
5
+
This Containerfile automatically builds GPTQ-for-LLaMa so you can use 4bit LLaMa models.
6
6
7
-
## Usage
7
+
## Prerequisites
8
8
9
-
`./build.sh` to pull the latest commit and build (script provides access to access GPU when building .whl for 4bit)
9
+
A working install of `nvidia-container-runtime`
10
+
11
+
For Fedora, see: [How to enable NVIDIA GPUs in containers on bare metal in RHEL 8](https://www.redhat.com/en/blog/how-use-gpus-containers-bare-metal-rhel-8)
12
+
13
+
A working install of `podman` or `docker`
14
+
15
+
A working install of `podman-compose` or `docker-compose-plugin`
16
+
17
+
## Podman Usage
18
+
19
+
`podman-compose build` to pull the latest commit and build.
10
20
11
21
`podman-compose up` to run the container, by default on port 7861.
12
22
23
+
## Docker Usage
24
+
25
+
`./docker.sh` will convert the Containerfile into a valid Dockerfile by removing some selinux labels (see that file for more details)
26
+
27
+
`docker compose -f podman-compose.yaml build` will pull the latest commit and build using the new modified Dockerfile from the last step.
28
+
29
+
`docker compose -f podman-compose.yaml up` will run the container.
30
+
31
+
**Gotchas:**
32
+
33
+
You will also likely need to set the default runtime. Create the following file:
34
+
35
+
`cat /etc/docker/daemon.json`
36
+
37
+
```json
38
+
{
39
+
"runtimes": {
40
+
"nvidia": {
41
+
"path": "nvidia-container-runtime",
42
+
"runtimeArgs": []
43
+
}
44
+
},
45
+
"default-runtime": "nvidia"
46
+
}
47
+
```
48
+
49
+
Additionally, If your machine is using `selinux`, you may need to run in privileged by setting `privileged: true` in the `podman-compose.yaml` file. This may have security ramifications beyond the scope of this setup. If you use selinux, I highly suggest running rootless with podman instead.
50
+
13
51
## Data
14
52
15
53
`./data` and `./output` will automatically be populated with files and directories from text-generation-webui. Files are set to copy once, then never copy again if they exist. If your models are on a different drive altogether, you can still add additional mount-points, like so:
@@ -23,15 +61,8 @@ volumes:
23
61
24
62
## Notes
25
63
26
-
The command line arguments can be changed by modifying `CLI_ARGS` in the podman-compose.yaml file
64
+
The command line arguments can be changed by modifying `CLI_ARGS` in the `podman-compose.yaml` file
27
65
28
66
## License
29
67
30
68
The license in this repository only applies to the files here, not the original work at [oobabooga/text-generation-webui](https://github.com/oobabooga/text-generation-webui). With that said:
0 commit comments