safe-code-execution
safe-code-execution copied to clipboard
Support docker compose for "the hard way"
Is your feature request related to a problem? Please describe. As a forgetful prosumer I always forget the docker calls to launch my services but don't have my own kubernetes cluster ;) I simply define my services in docker-compose files which works well enough for me.
Describe the solution you'd like I would like to amend the tutorial with the commands for docker compose or add a sample docker-compose.yml to bring up a working open-webui instance prepared for code execution.
Own work I looked up how to transform all these docker flags into docker compose and this is what i came up with:
open-webui:
build:
context: .
args:
OLLAMA_API_BASE_URL: '/ollama/api'
dockerfile: Dockerfile
image: ghcr.io/open-webui/open-webui:main
security_opt:
- seccomp:unconfined
- apparmor=unconfined
- label=type:container_engine_t
container_name: open-webui
volumes:
- open-webui:/app/backend/data
- /sys/fs/cgroup:/sys/fs/cgroup:rw
- /proc:/proc2:rw
The only flag that I didn't manage to set in docker compose is bind-recursive=disabled for procfs Is that absolutely necessary? Seems like that isn't possible yet in docker-compose yet https://github.com/docker/compose/issues/11792
Once the serivce is up, I ask it to curl a site and it errors out like this:
Environment needs setup work: /sys/fs/cgroup/cgroup.subtree_control not found; make sure you are using cgroups v2
but I guess that might be issue https://github.com/EtiennePerot/open-webui-code-execution/issues/14 .