docker-compose.yml 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. stdin_open: true
  10. tty: true
  11. deploy:
  12. resources:
  13. reservations:
  14. devices:
  15. - driver: nvidia
  16. count: 1
  17. capabilities: [gpu]
  18. tmpfs:
  19. - '/dev/shm:rw'
  20. # volumes:
  21. # - 'xgl-cache-vol:/cache'
  22. # - 'xgl-root-vol:/home/ubuntu'
  23. # 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
  24. # network_mode: 'host'
  25. environment:
  26. - TZ=UTC
  27. - DISPLAY_SIZEW=1920
  28. - DISPLAY_SIZEH=1080
  29. - DISPLAY_REFRESH=60
  30. - DISPLAY_DPI=96
  31. - DISPLAY_CDEPTH=24
  32. # With driver versions lower than 550, change to `DP-0` or any other `DP-*` port for larger resolution support if NOT using datacenter GPUs
  33. - VIDEO_PORT=DFP
  34. # User password of container
  35. - PASSWD=mypasswd
  36. # Uncomment to enable KasmVNC instead of Selkies-GStreamer, `SELKIES_BASIC_AUTH_PASSWORD` is used for authentication with KasmVNC, defaulting to `PASSWD` if not provided
  37. # 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`
  38. # - KASMVNC_ENABLE=true
  39. ###
  40. # Selkies-GStreamer parameters, for additional configurations see `selkies-gstreamer --help`
  41. ###
  42. # 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
  43. - SELKIES_ENCODER=nvh264enc
  44. - SELKIES_ENABLE_RESIZE=false
  45. # Initial video bitrate in kilobits per second, may be changed later within web interface
  46. - SELKIES_VIDEO_BITRATE=8000
  47. # Initial frames per second, may be changed later within web interface
  48. - SELKIES_FRAMERATE=60
  49. # Initial audio bitrate in bits per second, may be changed later within web interface
  50. - SELKIES_AUDIO_BITRATE=128000
  51. # Uncomment if network conditions rapidly fluctuate
  52. # - SELKIES_CONGESTION_CONTROL=true
  53. # Enable basic authentication with the web interface
  54. - SELKIES_ENABLE_BASIC_AUTH=true
  55. # Defaults to `PASSWD` if unspecified
  56. # - SELKIES_BASIC_AUTH_PASSWORD=mypasswd
  57. # Enable HTTPS web interface from inside the container
  58. - SELKIES_ENABLE_HTTPS=false
  59. # Volume mount trusted HTTPS certificate to new path for no web browser warnings
  60. # - SELKIES_HTTPS_CERT=/etc/ssl/certs/ssl-cert-snakeoil.pem
  61. # - SELKIES_HTTPS_KEY=/etc/ssl/private/ssl-cert-snakeoil.key
  62. ###
  63. # Uncomment and configure below to use a TURN server for improved network compatibility
  64. ###
  65. # - SELKIES_TURN_HOST=turn.example.com
  66. # - SELKIES_TURN_PORT=3478
  67. # 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
  68. # - SELKIES_TURN_SHARED_SECRET=n0TaRealCoTURNAuthSecretThatIsSixtyFourLengthsLongPlaceholdPlace
  69. # - SELKIES_TURN_USERNAME=username
  70. # - SELKIES_TURN_PASSWORD=mypasswd
  71. # TURN REST URI authentication, all TURN server settings above are ignored if enabled
  72. # - 'SELKIES_TURN_REST_URI=http://localhost:8008'
  73. # Change to `tcp` if the UDP protocol is throttled or blocked in your client network, or when the TURN server does not support UDP
  74. # - SELKIES_TURN_PROTOCOL=udp
  75. # You need a valid hostname and a certificate from authorities such as ZeroSSL (Let's Encrypt may have issues) to enable this
  76. # - SELKIES_TURN_TLS=false