This guide explains how to deploy and run DTUI2 in High-Performance Computing (HPC) environments, specifically addressing challenges in RedHat 8, NFS filesystems, and environments with shared memory restrictions.
-
Run HPC Setup:
./scripts/hpc-setup.sh
-
Test Environment:
./test-hpc-env.sh
-
Build for HPC:
npm run dist:linux
-
Launch with HPC Settings:
./dtui2-hpc.sh
Problem: Many HPC systems restrict /dev/shm access or have very limited shared memory.
Solution: DTUI2 can disable Chromium's shared memory usage with --disable-dev-shm-usage flag.
Problem: SELinux policies may prevent Electron/Chromium execution. Solutions:
- Use
--no-sandboxand--disable-setuid-sandboxflags - Disable GPU acceleration with
--disable-gpu - Use software rendering with
LIBGL_ALWAYS_SOFTWARE=1
Problem: NFS mounts may have restricted permissions for executable files. Solution: Use AppImage format which handles these restrictions automatically.
Problem: PBS, SLURM, or LSF environments may have additional restrictions. Solution: Automatic detection and appropriate flag configuration.
DTUI2 supports HPC-specific configuration in the hpc section:
{
"hpc": {
"disableGpu": true,
"disableShm": true,
"disableDevShmUsage": true,
"noSandbox": true,
"disableSetuidSandbox": true,
"singleProcess": false,
"disableFeatures": "VizDisplayCompositor,WebRtc,WebBluetooth"
}
}Override HPC settings using environment variables:
# Disable GPU acceleration
export DTUI_CFG__hpc__disableGpu=true
# Disable sandbox
export DTUI_CFG__hpc__noSandbox=true
# Use custom config file
export DTUI_USER_CONFIGFILE=/path/to/dtui-hpc.jsonDTUI2 automatically applies these Chromium flags in HPC mode:
--no-sandbox: Disable sandboxing--disable-setuid-sandbox: Disable setuid sandbox--disable-gpu: Disable hardware acceleration--disable-dev-shm-usage: Don't use /dev/shm--disable-software-rasterizer: Disable software rasterizer--disable-features=VizDisplayCompositor,WebRtc,WebBluetooth: Disable problematic features--memory-pressure-off: Disable memory pressure handling--single-process=false: Use multi-process (more stable than single-process)
# Check current environment
./test-hpc-env.sh
# Review output for potential issues# Run setup script
./scripts/hpc-setup.sh
# This creates:
# - dtui-hpc.json (HPC-optimized config)
# - dtui2-hpc.sh (HPC launcher script)
# - test-hpc-env.sh (environment tester)# Build the application
npm run build
# Create AppImage (Linux)
npm run dist:linux
# The AppImage will be in ./release/# Copy files to HPC system
scp release/DTUI2-*.AppImage user@hpc-system:/path/to/deployment/
scp dtui-hpc.json dtui2-hpc.sh user@hpc-system:/path/to/deployment/
# Make executable on HPC system
chmod +x DTUI2-*.AppImage dtui2-hpc.sh# Option 1: Use HPC launcher script
./dtui2-hpc.sh
# Option 2: Direct launch with custom config
export DTUI_USER_CONFIGFILE=./dtui-hpc.json
./DTUI2-*.AppImage
# Option 3: Environment variable configuration
export DTUI_CFG__hpc__disableGpu=true
export DTUI_CFG__hpc__noSandbox=true
./DTUI2-*.AppImage# Solution: Force software rendering
export LIBGL_ALWAYS_SOFTWARE=1
export DTUI_CFG__hpc__disableGpu=true# Solution: Disable shared memory usage
export DTUI_CFG__hpc__disableDevShmUsage=true# Check SELinux status
getenforce
# If enforcing, use no-sandbox mode
export DTUI_CFG__hpc__noSandbox=true# Use AppImage format (handles NFS better)
# Or copy to local temp directory:
cp DTUI2.AppImage $TMPDIR/
$TMPDIR/DTUI2.AppImage# Ensure DISPLAY is set
echo $DISPLAY
# Test X11 connection
xdpyinfo
# If X11 forwarding over SSH:
ssh -X user@hpc-systemEnable debug logging for troubleshooting:
# Enable Electron logging
export ELECTRON_ENABLE_LOGGING=1
export ELECTRON_LOG_FILE=./dtui2-debug.log
# Launch and check log
./dtui2-hpc.sh
tail -f dtui2-debug.logFor HPC environments, consider these optimizations:
{
"hpc": {
"disableGpu": true,
"disableFeatures": "VizDisplayCompositor,TranslateUI,WebRtc,WebBluetooth,MediaRouter",
"memoryPressureOff": true
},
"ai": {
"shell": {
"timeout": 30000
}
}
}#!/bin/bash
#PBS -N dtui2-job
#PBS -l nodes=1:ppn=1
#PBS -l walltime=01:00:00
cd $PBS_O_WORKDIR
export DTUI_USER_CONFIGFILE=$PWD/dtui-hpc.json
./dtui2-hpc.sh#!/bin/bash
#SBATCH --job-name=dtui2
#SBATCH --nodes=1
#SBATCH --time=01:00:00
export DTUI_USER_CONFIGFILE=$PWD/dtui-hpc.json
./dtui2-hpc.sh#!/bin/bash
#BSUB -J dtui2
#BSUB -n 1
#BSUB -W 01:00
export DTUI_USER_CONFIGFILE=$PWD/dtui-hpc.json
./dtui2-hpc.shIn HPC environments, DTUI2 runs with reduced security features:
- Sandboxing Disabled: Required for compatibility but reduces security isolation
- GPU Disabled: Prevents GPU-related security issues
- Reduced Feature Set: Disables potentially problematic web features
- Local Execution Only: Shell commands run locally, respecting job scheduler limits
# Run HPC-specific tests
npm run test:hpc
# Test configuration system
npm run test:config
# Test GUI with HPC settings
DTUI_USER_CONFIGFILE=dtui-hpc.json npm run test:gui- Application starts without errors
- Configuration loads correctly
- Shell commands execute properly
- Output formatting works
- No GPU-related errors in logs
- Memory usage stays reasonable
- Application responds to user input
For HPC-specific issues:
- Run
./test-hpc-env.shand include output - Check
dtui2-debug.logfor errors - Verify configuration with
cat $DTUI_USER_CONFIGFILE - Test basic functionality with minimal config