-
Notifications
You must be signed in to change notification settings - Fork 11
/
iraf
executable file
·31 lines (27 loc) · 1.04 KB
/
iraf
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
#!/bin/bash
# this script wraps the running of iraf within its container and sets up the X windows configuration so
# the graphics windows work properly. it maps the current working directory into the container as /home/iraf/data
# and runs 'xgterm -e cl' there. if you want to switch to a different directory on the host, you'll need to exit
# and then rerun this script there.
xhost + 127.0.0.1 > /dev/null 2>&1
docker run -ti --rm \
-e DISPLAY=host.docker.internal:0 \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v $PWD:/home/iraf/data \
--sysctl net.ipv4.tcp_keepalive_intvl=45 \
--sysctl net.ipv4.tcp_keepalive_probes=15 \
--sysctl net.ipv4.tcp_keepalive_time=120 \
iraf:latest \
/bin/bash -c "\
cd /home/iraf; \
source .bashrc; \
conda activate iraf27; \
cd data; \
if [ ! -e login.cl ]
then
cp ../login.cl .
mkdir uparm
fi; \
xgterm -sb -sl 5000 -geometry 80x48 -fn 10x20 -cr red -bg grey -e cl \
"
xhost - 127.0.0.1 > /dev/null 2>&1