-
Access the application:
- Open browser to: http://localhost:8082
- You should see the Lit Element demo page with "Hello, World!" and a "Start Trame" button
-
Test the Trame launcher:
- Click the "Start Trame" button
- A new window/tab will open with "Starting Trame… please wait"
- Backend will:
- Create a Docker container named
trame-user1 - Generate nginx config at
nginx/users/user1.conf - Reload nginx to pick up the new config
- Create a Docker container named
- Frontend will poll http://localhost:8082/user1/ until the Trame app responds
- You should be redirected to the Trame medical viewer application
-
Verify container is running:
docker ps --filter name=trame-user1
-
Check generated nginx config:
cat nginx\users\user1.conf
-
View logs:
# All services docker-compose logs -f # Specific service docker logs -f backend docker logs -f trame-user1 docker logs -f nginx
Problem: Backend couldn't write nginx configs because the directory wasn't mounted. Solution:
- Added
./nginx:/nginxvolume mount to backend container in docker-compose.yml - Backend now writes to
/nginx/users/{userId}.conf
Problem: Each user config created a separate server block listening on port 80, causing conflicts.
Solution:
- Restructured nginx config to use one
serverblock with includes - Dynamic user configs are now
locationblocks innginx/users/directory - Main
default.confincludes them withinclude /etc/nginx/conf.d/users/*.conf;
Problem: Node.js 18 deprecated old OpenSSL algorithms that es-dev-server relies on. Solution:
- Added
ENV NODE_OPTIONS=--openssl-legacy-providerto frontend Dockerfile
┌─────────────┐
│ Browser │
│ :8082 │
└──────┬──────┘
│
┌──────▼──────────────┐
│ Nginx Proxy :80 │
│ (exposed as :8082) │
├─────────────────────┤
│ / → frontend:8000
│ /api/ → backend:8080
│ /user1/ → trame-user1:8080
│ /user2/ → trame-user2:8080
└─────────────────────┘
│
┌───┴────┬─────────────┐
▼ ▼ ▼
┌────────┐ ┌────────┐ ┌──────────────┐
│Frontend│ │Backend │ │Trame Container│
│:8000 │ │:8081 │ │ (per user) │
└────────┘ └────┬───┘ └──────────────┘
│
┌──────▼───────┐
│Docker Socket │
│(creates │
│ containers) │
└──────────────┘
nginx/
default.conf # Main nginx config (static)
users/ # Dynamic user configs
user1.conf # Generated when user1 clicks "Start Trame"
user2.conf # Generated when user2 clicks "Start Trame"
data/
users/
user1/
input/ # User1's files (mounted into their container)
user2/
input/ # User2's files
Check if the trame-slicer image exists:
docker images | Select-String trame-slicerIf not, build it:
cd trame-server
docker build -t trame-slicer -f Dockerfile .
cd ..Check nginx logs:
docker logs nginx --tail 50Verify config syntax:
docker exec nginx nginx -tCheck if backend can access Docker socket:
docker exec backend ls -la /var/run/docker.sockCheck if serving properly:
docker logs frontendVerify nvidia-docker runtime:
docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi- Test with actual medical imaging files in
data/users/user1/input/ - Add authentication (currently no login required - using hardcoded user1)
- Implement container cleanup (currently containers auto-remove on exit)
- Add timeout mechanism (containers run indefinitely)
- Monitor resource usage