docker-compose.yml 4.5 KB

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