Repository navigation
Expand file tree
/
Copy pathHOWTORUN
More file actions
103 lines (88 loc) · 5.38 KB
/
Copy pathHOWTORUN
File metadata and controls
103 lines (88 loc) · 5.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#
# PRELIMINARIES -- on the "server"
#
# Build the container and then "run --name pfdcm " it.
# Depending on your purpose, choose either the Quick 'n dirty run --name pfdcm
# or, while developing, choose the run --name pfdcm with support for source debugging.
#
# Build (for fish shell syntax!)
set UID (id -u)
docker build --build-arg UID=$UID -t local/pfdcm .
# Quick 'n dirty run -- this is most likely what you'll mostly do.
# Obviously change port mappings if needed (and in the Dockerfile)
# Port 4005 is the actual pfdcm server, and port 1113 is the xinetd listener
# THIS STARTS IN INTERACTIVE MODE
docker run --name pfdcm --rm -it \
-p 4005:4005 -p 11113:11113 \
-v /home/dicom:/home/dicom \
local/pfdcm /start-reload.sh
# For daemon, or background mode:
docker run --name pfdcm --rm -it -d \
-p 4005:4005 -p 11113:11113 \
-v /home/dicom:/home/dicom \
local/pfdcm /start-reload.sh
# Quick 'n dirty run -- with volume mapping suitable for FNNDSC.
# Obviously change port mappings if needed (and in the Dockerfile)
# Here the -p 10502 mapping demonstrates how to map some external port
# on the host that might be receiving DICOM data to the internal listener.
docker run --name pfdcm --rm -it -d \
-p 4005:4005 -p 10502:11113 -p 11113:11113 \
-v /home/dicom:/home/dicom \
-v /neuro/users/chris/PACS:/neuro/users/chris/PACS \
local/pfdcm /start-reload.sh
# Run with support for source debugging
docker run --name pfdcm --rm -it \
-p 4005:4005 -p 11113:11113 \
-v /home/dicom:/home/dicom \
-v $PWD/pfdcm:/app:ro \
local/pfdcm /start-reload.sh
#
# Once the container is up and run --name pfdcm ning, the services within the container
# need to be activted.
#
# Note that the internal port that receives DICOM file PUSH is port
# 1113. If your PACS server is configured to transmit data to another/different
# port, one easy solution is to simply create a tunnel from your target port
# to port 1113. For instance, assume that your PACS server sends to port 10402
# of the machine hosting `pfdcm`. Let's call this machine for argument's sake
# `titan.tch.harvard.edu`. Connect the two ports together:
ssh -g -f -N -X -L 10402:titan.tch.harvard.edu:11113 \
rudolphpienaar@titan.tch.harvard.edu
# Of course, a better solution is to have the PACS send to the "correct" port
# from the get go. Alternatively, the internal `pfdcm` listening service can
# also be configure to use this port.
# Once the system has initiated, you need to set up some swift and CUBE keys.
# First, create a properly defined defaults.json (using of course your specific
# values where required):
pfdcm.sh --saveToJSON defaults.json \
--URL http://titan.tch.harvard.edu:4005 \
--serviceRoot /home/dicom \
--swiftKeyName titan \
--swiftIP 10.26.67.203 \
--swiftPort 8080 \
--swiftLogin chris:chris1234 \
--PACS PACSDCM \
--aet CHRISV3 \
--aetl PACSDCM \
--aec PACSDCM \
--serverIP 134.174.12.21 \
--serverPort 104 \
--cubeKeyName titan \
--cubeURL http://10.26.67.203:8000/api/v1/ \
--cubeUserName chris \
--cubePACSservice PACSDCM \
--cubeUserPassword chris1234 --
# Then, create persistent swift and CUBE data in the container
pfdcm.sh -u --swiftSetupDo --
pfdcm.sh -u --cubeSetupDo --
# Verify that swift.json and cube.json have been created in the `services` dir:
ls /home/dicom/services
# Note that the underlying infrastructure relies on a "poke" event to the pfdcm
# container xinetd on port 10502 to fire off the actual listener service that
# uses port 11113. This somewhat indirect approach was needed since the listener
# script couldn't be triggered by xinetd on the same port from which it
# also receives DICOM transmisstions.
pfdcm.sh -u -i --
# At this stage you should be able to perform queries/retrieves/status/etc. To
# see the actual http/curl comms that the agent transmits to the service, add
# a `-v 1` to the `pfdcm.sh` calls.