Browse Source

Multiple fixes to documentation

Seungmin Kim 9 months ago
parent
commit
04ef4cbfbe
3 changed files with 17 additions and 8 deletions
  1. 4 4
      README.md
  2. 4 3
      docker-compose.yml
  3. 9 1
      xgl.yml

+ 4 - 4
README.md

@@ -29,7 +29,7 @@ The KasmVNC interface can be enabled in place of Selkies by setting `KASMVNC_ENA
 **1. Run the container with Docker, Podman, or other NVIDIA-supported container runtimes ([NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) required):**
 
 ```bash
-docker run --name xgl -it -d --gpus 1 --tmpfs /dev/shm:rw -e TZ=UTC -e DISPLAY_SIZEW=1920 -e DISPLAY_SIZEH=1080 -e DISPLAY_REFRESH=60 -e DISPLAY_DPI=96 -e DISPLAY_CDEPTH=24 -e PASSWD=mypasswd -e SELKIES_ENCODER=nvh264enc -e SELKIES_VIDEO_BITRATE=8000 -e SELKIES_FRAMERATE=60 -e SELKIES_AUDIO_BITRATE=128000 -e SELKIES_BASIC_AUTH_PASSWORD=mypasswd -p 8080:8080 ghcr.io/selkies-project/nvidia-glx-desktop:latest
+docker run --name xgl -it -d --gpus 1 --runtime nvidia --tmpfs /dev/shm:rw -e TZ=UTC -e DISPLAY_SIZEW=1920 -e DISPLAY_SIZEH=1080 -e DISPLAY_REFRESH=60 -e DISPLAY_DPI=96 -e DISPLAY_CDEPTH=24 -e PASSWD=mypasswd -e SELKIES_ENCODER=nvh264enc -e SELKIES_VIDEO_BITRATE=8000 -e SELKIES_FRAMERATE=60 -e SELKIES_AUDIO_BITRATE=128000 -e SELKIES_BASIC_AUTH_PASSWORD=mypasswd -p 8080:8080 ghcr.io/selkies-project/nvidia-glx-desktop:latest
 ```
 
 **Alternatively, use Docker Compose by editing the [`docker-compose.yml`](docker-compose.yml) file:**
@@ -68,9 +68,9 @@ Choose whether to use host networking, an internal [TURN server](https://github.
 
 There is an internal [TURN server](https://github.com/selkies-project/selkies/blob/main/docs/firewall.md#turn-server) inside the container that may be used when an external [TURN server](https://github.com/selkies-project/selkies/blob/main/docs/firewall.md#turn-server) or host networking is not available.
 
-Add environment variables `-e SELKIES_TURN_PROTOCOL=udp -e SELKIES_TURN_PORT=3478 -e TURN_MIN_PORT=65534 -e TURN_MAX_PORT=65535` (change the ports accordingly) with the `docker run` command (or uncomment the relevant [`docker-compose.yml`](docker-compose.yml) sections), where the `SELKIES_TURN_PORT` should not be used by any other host process or container, and the `TURN_MIN_PORT`/`TURN_MAX_PORT` port range has to contain at least two ports also not used by any other host process or container.
+Add environment variables `-e SELKIES_TURN_PROTOCOL=udp -e SELKIES_TURN_PORT=3478 -e TURN_MIN_PORT=65532 -e TURN_MAX_PORT=65535` (change the ports accordingly) with the `docker run` command (or uncomment the relevant [`docker-compose.yml`](docker-compose.yml) sections), where the `SELKIES_TURN_PORT` should not be used by any other host process or container, and the `TURN_MIN_PORT`/`TURN_MAX_PORT` port range has to contain at least two ports also not used by any other host process or container.
 
-Then, open the ports with the `docker run` arguments `-p 8080:8080 -p 3478:3478 -p 3478:3478/udp -p 65534-65535:65534-65535 -p 65534-65535:65534-65535/udp` (or uncomment the relevant [`docker-compose.yml`](docker-compose.yml) sections) in addition to the web server port.
+Then, open the ports with the `docker run` arguments `-p 8080:8080 -p 3478:3478 -p 3478:3478/udp -p 65532-65535:65532-65535 -p 65532-65535:65532-65535/udp` (or uncomment the relevant [`docker-compose.yml`](docker-compose.yml) sections) in addition to the web server port.
 
 If UDP cannot be used, at the cost of higher latency and lower performance, omit the ports containing `/udp` and use the environment variable `-e SELKIES_TURN_PROTOCOL=tcp`.
 
@@ -141,7 +141,7 @@ Choose whether to use host networking, an internal [TURN server](https://github.
 
 There is an internal [TURN server](https://github.com/selkies-project/selkies/blob/main/docs/firewall.md#turn-server) inside the container that may be used when an external [TURN server](https://github.com/selkies-project/selkies/blob/main/docs/firewall.md#turn-server) or host networking is not available.
 
-Uncomment the relevant environment variables `SELKIES_TURN_PROTOCOL=udp`, `SELKIES_TURN_PORT=3478`, `TURN_MIN_PORT=65534`, `TURN_MAX_PORT=65535` (change the ports accordingly) within `xgl.yml` (within `name:` and `value:`), where the `SELKIES_TURN_PORT` should not be used by any other host process or container, and the `TURN_MIN_PORT`/`TURN_MAX_PORT` port range has to contain at least two ports also not used by any other host process or container. Then, open all of these ports in the Kubernetes configuration `ports:` section in addition to the web server port.
+Uncomment the relevant environment variables `SELKIES_TURN_PROTOCOL=udp`, `SELKIES_TURN_PORT=3478`, `TURN_MIN_PORT=65532`, `TURN_MAX_PORT=65535` (change the ports accordingly) within `xgl.yml` (within `name:` and `value:`), where the `SELKIES_TURN_PORT` should not be used by any other host process or container, and the `TURN_MIN_PORT`/`TURN_MAX_PORT` port range has to contain at least two ports also not used by any other host process or container. Then, open all of these ports in the Kubernetes configuration `ports:` section in addition to the web server port.
 
 If UDP cannot be used, at the cost of higher latency and lower performance, omit the UDP ports in the configuration and use the environment variable `SELKIES_TURN_PROTOCOL=tcp` (within `name:` and `value:`).
 

+ 4 - 3
docker-compose.yml

@@ -4,13 +4,14 @@ services:
     hostname: xgl
     # Change tag `latest` to Ubuntu versions such as `24.04`, use a persistent tag such as `24.04-20210101010101` to persist a certain container version
     image: ghcr.io/selkies-project/nvidia-glx-desktop:latest
+    runtime: nvidia
     ports:
     - '8080:8080'
     # Internal TURN server settings
 #    - '3478:3478'
-#    - '65534-65535:65534-65535'
+#    - '65532-65535:65532-65535'
 #    - '3478:3478/udp'
-#    - '65534-65535:65534-65535/udp'
+#    - '65532-65535:65532-65535/udp'
     stdin_open: true
     tty: true
     deploy:
@@ -76,7 +77,7 @@ services:
     # You need a valid hostname and a certificate from authorities such as ZeroSSL or Let's Encrypt with your TURN server to enable TURN over TLS
 #    - SELKIES_TURN_TLS=false
     # Internal TURN server settings, do not uncomment other TURN server settings below this when using an internal TURN server
-#    - TURN_MIN_PORT=65534
+#    - TURN_MIN_PORT=65532
 #    - TURN_MAX_PORT=65535
     # Provide only `SELKIES_TURN_SHARED_SECRET` for time-limited shared secret authentication or both `SELKIES_TURN_USERNAME` and `SELKIES_TURN_PASSWORD` for legacy long-term authentication, but do not provide both authentication methods at the same time
 #    - SELKIES_TURN_SHARED_SECRET=n0TaRealCoTURNAuthSecretThatIsSixtyFourLengthsLongPlaceholdPlace

+ 9 - 1
xgl.yml

@@ -107,7 +107,7 @@ spec:
 #          value: "false"
         # Internal TURN server settings, do not uncomment other TURN server settings below this when using an internal TURN server
 #        - name: TURN_MIN_PORT
-#          value: "65534"
+#          value: "65532"
 #        - name: TURN_MAX_PORT
 #          value: "65535"
         # Provide only `SELKIES_TURN_SHARED_SECRET` for time-limited shared secret authentication or both `SELKIES_TURN_USERNAME` and `SELKIES_TURN_PASSWORD` for legacy long-term authentication, but do not provide both authentication methods at the same time
@@ -137,12 +137,20 @@ spec:
         # Internal TURN server settings
 #        - containerPort: 3478
 #          protocol: TCP
+#        - containerPort: 65532
+#          protocol: TCP
+#        - containerPort: 65533
+#          protocol: TCP
 #        - containerPort: 65534
 #          protocol: TCP
 #        - containerPort: 65535
 #          protocol: TCP
 #        - containerPort: 3478
 #          protocol: UDP
+#        - containerPort: 65532
+#          protocol: UDP
+#        - containerPort: 65533
+#          protocol: UDP
 #        - containerPort: 65534
 #          protocol: UDP
 #        - containerPort: 65535