docker-compose.yml 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. services:
  2. xgl:
  3. container_name: xgl
  4. hostname: xgl
  5. # Change tag `latest` to Ubuntu versions such as `24.04`
  6. image: ghcr.io/selkies-project/nvidia-glx-desktop:latest
  7. ports:
  8. - '8080:8080'
  9. # Internal TURN server settings
  10. # - '3478:3478'
  11. # - '65534-65535:65534-65535'
  12. # - '3478:3478/udp'
  13. # - '65534-65535:65534-65535/udp'
  14. stdin_open: true
  15. tty: true
  16. deploy:
  17. resources:
  18. reservations:
  19. devices:
  20. - driver: nvidia
  21. count: 1
  22. capabilities: [gpu]
  23. tmpfs:
  24. - '/dev/shm:rw'
  25. # volumes:
  26. # - 'xgl-cache-vol:/cache'
  27. # - 'xgl-root-vol:/home/ubuntu'
  28. # Uncomment the below line to disable network isolation for WebRTC connectivity, display `:20` and `:21` should not be used in the host, may show an error if disallowed by the cluster
  29. # network_mode: 'host'
  30. environment:
  31. - TZ=UTC
  32. - DISPLAY_SIZEW=1920
  33. - DISPLAY_SIZEH=1080
  34. - DISPLAY_REFRESH=60
  35. - DISPLAY_DPI=96
  36. - DISPLAY_CDEPTH=24
  37. # With driver versions lower than 550, change to `DP-0` or any other `DP-*` port for larger resolution support if NOT using datacenter GPUs
  38. - VIDEO_PORT=DFP
  39. # User password of container
  40. - PASSWD=mypasswd
  41. # Uncomment to enable KasmVNC instead of Selkies-GStreamer, `SELKIES_BASIC_AUTH_PASSWORD` is used for authentication with KasmVNC, defaulting to `PASSWD` if not provided
  42. # Uses: `SELKIES_ENABLE_BASIC_AUTH`, `SELKIES_BASIC_AUTH_USER`, `SELKIES_BASIC_AUTH_PASSWORD`, `SELKIES_ENABLE_RESIZE`, `SELKIES_ENABLE_HTTPS`, `SELKIES_HTTPS_CERT`, `SELKIES_HTTPS_KEY`
  43. # - KASMVNC_ENABLE=true
  44. # Number of threads for encoding frames with KasmVNC, default value is all threads
  45. # - name: KASMVNC_THREADS=0
  46. ###
  47. # Selkies-GStreamer parameters, for additional configurations see `selkies-gstreamer --help`
  48. ###
  49. # Change `SELKIES_ENCODER` to `x264enc`, `vp8enc`, or `vp9enc` if using software fallback without allocated GPUs or your GPU does not support `H.264 (AVCHD)` under the `NVENC - Encoding` section in https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new
  50. - SELKIES_ENCODER=nvh264enc
  51. - SELKIES_ENABLE_RESIZE=false
  52. # Initial video bitrate in kilobits per second, may be changed later within web interface
  53. - SELKIES_VIDEO_BITRATE=8000
  54. # Initial frames per second, may be changed later within web interface
  55. - SELKIES_FRAMERATE=60
  56. # Initial audio bitrate in bits per second, may be changed later within web interface
  57. - SELKIES_AUDIO_BITRATE=128000
  58. # Uncomment if network conditions rapidly fluctuate
  59. # - SELKIES_CONGESTION_CONTROL=true
  60. # Enable basic authentication with the web interface
  61. - SELKIES_ENABLE_BASIC_AUTH=true
  62. # Defaults to `PASSWD` if unspecified
  63. # - SELKIES_BASIC_AUTH_PASSWORD=mypasswd
  64. # Enable HTTPS web interface from inside the container
  65. - SELKIES_ENABLE_HTTPS=false
  66. # Volume mount trusted HTTPS certificate to new path for no web browser warnings
  67. # - SELKIES_HTTPS_CERT=/etc/ssl/certs/ssl-cert-snakeoil.pem
  68. # - SELKIES_HTTPS_KEY=/etc/ssl/private/ssl-cert-snakeoil.key
  69. ###
  70. # Uncomment and configure below to use a TURN server for improved network compatibility
  71. ###
  72. # - SELKIES_TURN_HOST=turn.example.com
  73. # - SELKIES_TURN_PORT=3478
  74. # Change to `tcp` if the UDP protocol is throttled or blocked in your client network, or when the TURN server does not support UDP
  75. # - SELKIES_TURN_PROTOCOL=udp
  76. # You need a valid hostname and a certificate from authorities such as ZeroSSL (Let's Encrypt may have issues) to enable this
  77. # - SELKIES_TURN_TLS=false
  78. # Internal TURN server settings, do not uncomment other TURN server settings below this when using an internal TURN server
  79. # - TURN_MIN_PORT=65534
  80. # - TURN_MAX_PORT=65535
  81. # 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
  82. # - SELKIES_TURN_SHARED_SECRET=n0TaRealCoTURNAuthSecretThatIsSixtyFourLengthsLongPlaceholdPlace
  83. # - SELKIES_TURN_USERNAME=username
  84. # - SELKIES_TURN_PASSWORD=mypasswd
  85. # TURN REST URI authentication, all TURN server settings above are ignored if enabled
  86. # - 'SELKIES_TURN_REST_URI=http://localhost:8008'