-
Notifications
You must be signed in to change notification settings - Fork 1
/
USAGE.txt
87 lines (74 loc) · 2.54 KB
/
USAGE.txt
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
USAGE
The simplest way to start using this image is to make yourself
a script and run docker from there. See examples below.
You would run it something like:
bash runAT.bash "tleap -f tleap.input"
For non-interactive utilities, e.g., sander, try a
script like the following.
This one also handles utilities that need a username,
for example OpenMPI.
=======================================================
=========== run_AT.bash NON-interactive ===============
=======================================================
#!/bin/bash
## bash file for running an amber utility that
## does not expect an interactive session, e.g., sander
##
## Change these variables as desired
IMAGE='ambertools:16'
#IMAGE='lachele/ambertools:16'
WORKDIR=$(pwd) # use an absolute path if you change this
GROUP=${GROUPS[0]} # your group id
RM='true' # change to false to keep the container around
# after you have used it
# ...this is generally not desirable
##
##
docker run --rm=${RM} \
-v ${WORKDIR}:/home/working \
${IMAGE} \
/bin/bash -c "\
chown $UID:${GROUP} /home/working \
&& groupadd -g ${GROUP} working \
&& adduser --home /home/working \
--shell /bin/bash \
--uid $UID \
--gid ${GROUP} \
--disabled-password \
--system working \
&& su - working \
&& cd /home/working \
&& source /usr/local/amber16/amber.sh \
&& $1"
=======================================================
=======================================================
For interactive utilities, e.g., tleap, try a
script like the following. This one won't work
well with utilities that want a username.
=======================================================
============ run_iAT.bash Interactive =================
=======================================================
#!/bin/bash
## bash file for running an amber utility that
## expects an interactive session, e.g., tleap
##
## Change these variables as desired
IMAGE='ambertools:16'
#IMAGE='lachele/ambertools:16'
WORKDIR=$(pwd) # use an absolute path if you change this
USER=$UID # your user id
GROUP=${GROUPS[0]} # your group id
RM='true' # change to false to keep the container around
# after you have used it
# ...this is generally not desirable
##
##
docker run -it --rm=${RM} \
-v ${WORKDIR}:/home/working \
-u="${USER}:${GROUP}" \
-w="/home/working" \
${IMAGE} \
/bin/bash -c "source /usr/local/amber16/amber.sh \
&& $1"
=======================================================
=======================================================