From b3602e7460d283427fd7d447ac104b381602326b Mon Sep 17 00:00:00 2001 From: vajonam <152501+vajonam@users.noreply.github.com> Date: Thu, 4 Apr 2024 10:12:49 -0400 Subject: [PATCH] fix: update docs and example compose Signed-off-by: vajonam <152501+vajonam@users.noreply.github.com> --- README.md | 17 ++++++++++++++++- docker-compose.yml | 3 ++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 80b2af8..c8afa33 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,22 @@ To use a VNC viewer with the container, the default port for X TigerVNC is 5900. Like other Docker containers, you can pass your Nvidia GPU into the container using the `NVIDIA_VISIBLE_DEVICES` and `NVIDIA_DRIVER_CAPABILITIES` envs. You can define these using the value of `all` or by providing more narrow and specific values. This has only been tested on Nvidia GPUs. -In unraid you can set these values during set up. For containers outside of unraid, you can set this by adding the following params or similar `-e NVIDIA_DRIVER_CAPABILITIES="all" NVIDIA_VISIBLE_DEVICES="all"`. If using Docker Compose, uncomment the enviroment variables in the relevant docker-compose.yaml file. +In unraid you can set these values during set up. For containers outside of unraid, you can set this by adding the following params or similar `-e NVIDIA_DRIVER_CAPABILITIES="all" NVIDIA_VISIBLE_DEVICES="all"`. If using Docker Compose, uncomment the enviroment variables in the relevant docker-compose.yaml file. + +In addtion to the above, to enable HW 3D acceleration (helps with complex models and visualizing the sliced layers), you must pass ane environment variable by adding a `-e ENABLEHWGPU=true` to the docker run command or adding `- ENABLEHWGPU=true` to your docker compose. + +### Other Environment Variables + +Default values shown below. + +- `DISPLAY=:0` sets the DISPLAY variable, this can be left as 0 +- `VGL_DISPLAY=egl` needed for HW 3D accelration with EGL support on the HOST graphics driver. +- `SUPD_LOGLEVEL=INFO` log level for supervisord +- `ENABLEHWGPU=true` enable HW 3D Accelaration +- `VNC_RESOLUTION=1280x800` resolution of the VNC server +- `VNC_PASSWORD=(None)` defaults to no VNC password, you can add one here. +- `NOVNC_PORT=8080` port for the novonc HTML5/web interface. +- `VNC_PORT=5900` port fo the vnc server, allows direct connections using a VNC client. Note the `DISPLAY` number above is added to the port number, so if your display is :1 then VNC port accepting connections will be `5901` ## Links diff --git a/docker-compose.yml b/docker-compose.yml index 160b193..659c6e1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,9 +8,10 @@ services: - SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt - NVIDIA_VISIBLE_DEVICES=0 - NVIDIA_DRIVER_CAPABILITIES=all - - DISPLAY=:1 + - DISPLAY=:0 - VGL_DISPLAY=egl # needed to run without X server - SUPD_LOGLEVEL=INFO + - ENABLEHWGPU=true - VNC_RESOLUTION=1920x1080 volumes: - ./prints:/prints/