Commit f11ebe06bb64083ef983842803782ebcc4b0845e
1 parent
d7a4c851
Exists in
dev
Dockerfile cleanup & PYROS_DOCKER_UPDATE auto updates guitastro (git pull)
Showing
2 changed files
with
47 additions
and
10 deletions
Show diff stats
Dockerfile
... | ... | @@ -20,6 +20,11 @@ FROM ubuntu:20.04 |
20 | 20 | ARG uid |
21 | 21 | |
22 | 22 | |
23 | + | |
24 | +################ | |
25 | +# Mysql client # | |
26 | +################ | |
27 | + | |
23 | 28 | RUN apt-get update && apt-get upgrade -y |
24 | 29 | RUN DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata |
25 | 30 | |
... | ... | @@ -31,29 +36,41 @@ RUN apt-get install -y \ |
31 | 36 | nano vim \ |
32 | 37 | git |
33 | 38 | |
34 | -# Python3.8 & pip | |
39 | + | |
40 | + | |
41 | +################ | |
42 | +# Python & pip # | |
43 | +################ | |
35 | 44 | RUN apt-get install -y python3.8 |
36 | 45 | RUN apt-get install -y python3.8-dev |
37 | 46 | RUN apt-get install -y python3-pip |
38 | 47 | RUN cd /usr/bin && ln -s python3 python |
39 | 48 | RUN python -m pip install --upgrade pip |
40 | 49 | |
41 | -# For guitastro | |
42 | 50 | |
43 | 51 | # DEV only |
44 | 52 | # for dot => PNG diagrams generation with pyreverse (pylint) |
45 | 53 | RUN apt-get install -y graphviz graphviz-dev |
46 | 54 | |
47 | -# Guitastro | |
55 | + | |
56 | + | |
57 | +############# | |
58 | +# GUITASTRO # | |
59 | +############# | |
60 | + | |
61 | +# | |
62 | +# Guitastro C/C++ dependencies | |
63 | +# | |
64 | + | |
65 | +# - ASTROMETRY.NET (in order to process images locally, without having to send (big) images to astrometry.net) | |
48 | 66 | RUN apt-get install -y \ |
49 | - # - ASTROMETRY.NET (in order to process images locally, without having to send (big) images to astrometry.net) | |
50 | 67 | astrometry.net astrometry-data-tycho2 \ |
51 | 68 | #astrometry-data-2mass \ |
52 | 69 | # - PIL |
53 | 70 | python3-tk \ |
54 | 71 | python3-pil python3-pil.imagetk |
55 | 72 | |
56 | -# - INDI => for Guitastro | |
73 | +# - INDI | |
57 | 74 | # https://indilib.org/get-indi/download-ubuntu.html |
58 | 75 | # For apt-add-repository : |
59 | 76 | RUN apt-get install -y software-properties-common |
... | ... | @@ -72,14 +89,14 @@ RUN apt-get install -y gsc kstars-bleeding libindi1 indi-bin swig libz3-dev libc |
72 | 89 | # Obligatoire ? |
73 | 90 | #RUN pip install --user --install-option="--prefix=" pyindi-client |
74 | 91 | |
75 | -# - ASTAP (Astrometry) => for Guitastro | |
92 | +# - ASTAP (Astrometry) | |
76 | 93 | # Download .deb file from https://www.hnsky.org/astap.htm |
77 | 94 | RUN apt-get install -y wget |
78 | 95 | RUN wget https://www.hnsky.org/astap_amd64.deb |
79 | 96 | RUN apt-get install -y ./astap_amd64.deb |
80 | 97 | RUN rm ./astap_amd64.deb |
81 | 98 | |
82 | -# - PYLON (Cameras BASLER) => for Guitastro | |
99 | +# - PYLON (Cameras BASLER) | |
83 | 100 | # https://www.baslerweb.com/en/products/software/basler-pylon-camera-software-suite/ |
84 | 101 | # (you will have to fill a form to be able to download) |
85 | 102 | # pylon_6.3.0.23157_x86_64_setup.tar.gz |
... | ... | @@ -103,6 +120,7 @@ RUN apt-get update && apt-get upgrade -y |
103 | 120 | # apt install spyder |
104 | 121 | # apt install graphviz libgraphviz-dev |
105 | 122 | |
123 | +# - Graphic layer | |
106 | 124 | # Add a VNC server to have local graphic windows |
107 | 125 | # When you run this container, a VNC server will be created automatically. |
108 | 126 | # You must bind a host port to the containerโs port 5900 โ this is the port the VNC server will be exposed on |
... | ... | @@ -113,9 +131,16 @@ CMD ["x11vnc", "-create", "-forever"] |
113 | 131 | #RUN x11vnc -create -forever |
114 | 132 | |
115 | 133 | |
134 | + | |
135 | + | |
136 | + | |
116 | 137 | # Get IRAP self signed certificate |
117 | 138 | RUN echo | openssl s_client -connect gitlab.irap.omp.eu:443 -servername gitlab.irap.omp.eu 2>/dev/null | openssl x509 > /etc/ssl/certs/gitlab.irap.omp.eu.crt |
118 | 139 | |
140 | +################################# | |
141 | +# PyROS user (better than root) # | |
142 | +################################# | |
143 | + | |
119 | 144 | RUN echo "$uid" > test.txt |
120 | 145 | # Adding new user (pyros_user) and creating his home folder |
121 | 146 | RUN useradd --create-home --shell /bin/bash pyros_user --uid $uid |
... | ... | @@ -127,18 +152,18 @@ WORKDIR /home/pyros_user/app |
127 | 152 | # Switch from root to pyros_user |
128 | 153 | USER pyros_user |
129 | 154 | |
130 | -#RUN python -m pip3 install --user --upgrade pip | |
131 | -#RUN pip install --user --upgrade pip | |
132 | 155 | #RUN pip install --user wheel |
133 | 156 | # TODO: pourquoi numpy ??? A virer ? |
134 | 157 | #RUN pip install --user numpy |
135 | 158 | |
159 | + | |
160 | + | |
136 | 161 | # Copy local host machine files to image |
137 | 162 | COPY --chown=pyros_user:pyros_user . . |
138 | 163 | # Copy some aliases |
139 | 164 | RUN cp .bash_aliases .. |
140 | 165 | #RUN mv .bash_aliases .. |
141 | -#COPY --chown=pyros_user:pyros_user .bash_aliases .. | |
166 | + | |
142 | 167 | |
143 | 168 | # Adding local/bin to path to avoid pip warning |
144 | 169 | ENV PATH "$PATH:/home/pyros_user/.local/bin" |
... | ... | @@ -155,6 +180,9 @@ RUN pip install --user click |
155 | 180 | # - But we can at least use it to generate all the requirements*.txt files in a far better format |
156 | 181 | RUN pip install --user pip-tools |
157 | 182 | |
183 | + | |
184 | + | |
158 | 185 | # Installing packages required for PyROS |
159 | 186 | RUN pip install --user -r ./install/requirements.txt |
160 | 187 | RUN pip install --user -r ./install/requirements_dev.txt |
188 | + | ... | ... |
docker/PYROS_DOCKER_UPDATE
... | ... | @@ -6,6 +6,15 @@ then |
6 | 6 | echo "db_pyros or pyros weren't running, starting them..." |
7 | 7 | ./PYROS_DOCKER_START.bat |
8 | 8 | fi |
9 | + | |
10 | +# Update source code | |
11 | +# - GuitastroGuitastro | |
12 | +echo "Updating Guitastro source code" | |
13 | +(cd ../vendor/guitastro/ ; git pull) | |
14 | +# - PyROS | |
15 | +echo "Updating PyROS source code" | |
9 | 16 | git pull |
17 | + | |
18 | +# Update BD, doc, ... | |
10 | 19 | docker exec -it pyros python3 pyros.py update |
11 | 20 | ... | ... |