Commit 8124063fd9644f27a9c587d36afb33b928d32780
1 parent
704f72aa
Exists in
dev
Update dockerfile (Upgrading to Ubuntu 22.04 & python 3.10) & requirements files
Showing
4 changed files
with
67 additions
and
50 deletions
Show diff stats
Dockerfile
1 | 1 | # https://pythonspeed.com/articles/base-image-python-docker-images |
2 | -FROM ubuntu:20.04 | |
2 | +#FROM ubuntu:20.04 | |
3 | +FROM ubuntu:22.04 | |
3 | 4 | #FROM ubuntu:latest |
4 | 5 | #FROM ubuntu:21.10 # with python3.9 |
5 | 6 | #FROM ubuntu:18.04 |
... | ... | @@ -36,19 +37,36 @@ RUN apt-get install -y \ |
36 | 37 | #default-mysql-client \ |
37 | 38 | libmysqlclient-dev \ |
38 | 39 | nano vim \ |
39 | - git | |
40 | + git \ | |
41 | + curl | |
40 | 42 | |
41 | 43 | |
42 | 44 | |
43 | 45 | ################ |
44 | 46 | # Python & pip # |
45 | 47 | ################ |
46 | -RUN apt-get install -y python3.8 | |
47 | -RUN apt-get install -y python3.8-dev | |
48 | -RUN apt-get install -y python3-pip | |
48 | +# For apt-add-repository : | |
49 | +RUN apt-get install -y software-properties-common | |
50 | +# Needed for python 3.10 | |
51 | +RUN add-apt-repository ppa:deadsnakes/ppa | |
52 | +# Needed for INDI | |
53 | +RUN apt-add-repository ppa:mutlaqja/ppa | |
54 | +RUN apt-get install -y python3.10 | |
55 | +RUN apt-get install -y python3.10-dev | |
56 | +RUN apt-get install -y python3.10-distutils | |
57 | +#RUN ln -sf /usr/bin/python3.10 /usr/bin/python3 | |
58 | +RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2 | |
59 | +#RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1 | |
60 | +RUN ln -sf /usr/bin/python3.10 /usr/bin/python3 | |
61 | +RUN update-alternatives --config python3 | |
62 | +RUN apt-get install -y python3-apt | |
49 | 63 | RUN cd /usr/bin && ln -s python3 python |
64 | +#RUN apt-get install -y python3-pip | |
65 | +RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 | |
66 | +#RUN pip3 install --upgrade pip | |
67 | +RUN python3.10 -m pip install --upgrade pip | |
68 | + | |
50 | 69 | |
51 | -RUN pip3 install --upgrade pip | |
52 | 70 | |
53 | 71 | |
54 | 72 | # DEV only |
... | ... | @@ -75,10 +93,8 @@ RUN apt-get install -y \ |
75 | 93 | |
76 | 94 | # - INDI |
77 | 95 | # https://indilib.org/get-indi/download-ubuntu.html |
78 | -# For apt-add-repository : | |
79 | -RUN apt-get install -y software-properties-common | |
80 | 96 | # Add repository |
81 | -RUN apt-add-repository ppa:mutlaqja/ppa | |
97 | + | |
82 | 98 | # Add public key for this repo |
83 | 99 | RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 487CEC2B3F33A288 |
84 | 100 | #RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 487CEC2B3F33A288 |
... | ... | @@ -171,8 +187,8 @@ RUN cp .bash_aliases .. |
171 | 187 | ENV PATH "$PATH:/home/pyros_user/.local/bin" |
172 | 188 | |
173 | 189 | # Installing click on the image to prevent error on the first execution of the installation script |
174 | -RUN pip install --user click | |
175 | - | |
190 | +RUN python3.10 -m pip install --user click | |
191 | +RUN python3.10 -m pip install --user setuptools==58 | |
176 | 192 | # (EP 23/3/2022) Installing pip-tools for the management of all the requirements*.txt files (python dependencies packages) |
177 | 193 | # NB : |
178 | 194 | # - pip-tools generates a smarter and smaller requirements.txt file than the traditional "pip freeze" |
... | ... | @@ -180,15 +196,15 @@ RUN pip install --user click |
180 | 196 | # - Unfortunatly, it is difficult to use with several requirements*.txt files as it is the case for this software : pyros + sphinx + guitastro... |
181 | 197 | # - So we cannot yet use it completely and still have to use the traditional "pip install -r" anyway ... |
182 | 198 | # - But we can at least use it to generate all the requirements*.txt files in a far better format |
183 | -RUN pip install --user pip-tools | |
199 | +RUN python3.10 -m pip install --user pip-tools | |
184 | 200 | |
185 | 201 | RUN pip-compile ./vendor/guitastro/install/requirements.in |
186 | 202 | # Installing packages required for Guitastro |
187 | -RUN pip install --user -r ./vendor/guitastro/install/requirements.txt | |
203 | +RUN python3.10 -m pip install --user -r ./vendor/guitastro/install/requirements.txt | |
188 | 204 | # Maybe unnecessary because same requirements as for pyros requirements_dev (?) |
189 | 205 | #RUN pip install --user -r ./vendor/guitastro/install/requirements_dev.txt |
190 | 206 | |
191 | 207 | # Installing packages required for PyROS |
192 | -RUN pip install --user -r ./install/requirements.txt | |
193 | -RUN pip install --user -r ./install/requirements_dev.txt | |
208 | +RUN python3.10 -m pip install --user -r ./install/requirements.txt | |
209 | +RUN python3.10 -m pip install --user -r ./install/requirements_dev.txt | |
194 | 210 | ... | ... |
VERSION
install/requirements.txt
1 | 1 | anyjson==0.3.3 |
2 | 2 | click==8.0.3 |
3 | -DateTime==4.3 | |
3 | +DateTime==5.1 | |
4 | 4 | Django==4.1 |
5 | -django-admin-tools==0.9.1 | |
6 | -django-bootstrap3==21.1 | |
7 | -django-extensions==3.1.5 | |
5 | +django-admin-tools==0.9.2 | |
6 | +django-bootstrap3==23.1 | |
7 | +django-extensions==3.2.1 | |
8 | 8 | # for Django Rest Framework (DRF) |
9 | 9 | djangorestframework==3.14.0 |
10 | 10 | # for Choices |
11 | -django-model-utils==4.2.0 | |
11 | +django-model-utils==4.3.1 | |
12 | 12 | django-suit==0.2.28 |
13 | 13 | django-test-without-migrations==0.6 |
14 | -#gunicorn==19.8.1 | |
15 | -iso8601==1.0.0 | |
14 | +#gunicorn>=19.8.1 | |
15 | +iso8601==1.1.0 | |
16 | 16 | jdcal==1.4.1 |
17 | -#lxml==4.3.0 | |
18 | -lxml==4.6.4 | |
19 | -mysqlclient==2.0.3 | |
17 | +#lxml>=4.3.0 | |
18 | +lxml==4.9.2 | |
19 | +mysqlclient==2.1.1 | |
20 | 20 | #pluggy>=0.7 |
21 | 21 | pluggy==1.0.0 |
22 | 22 | py==1.11.0 |
23 | -pytz==2021.3 | |
24 | -requests==2.26.0 | |
23 | +pytz==2023.3 | |
24 | +requests==2.28.2 | |
25 | 25 | six==1.16.0 |
26 | -sqlparse==0.4.2 | |
27 | -Twisted==21.7.0 | |
26 | +sqlparse==0.4.4 | |
27 | +Twisted==22.10.0 | |
28 | 28 | voevent-parse==1.0.3 |
29 | -zope.interface==5.4.0 | |
29 | +zope.interface==6.0 | |
30 | 30 | |
31 | 31 | |
32 | 32 | # |
33 | 33 | # For Celery: |
34 | 34 | # |
35 | -##celery==3.1.23 | |
36 | -##flower==0.9.2 | |
37 | -##amqp==1.4.9 | |
38 | -##amqplib==1.0.2 | |
39 | -##billiard==3.3.0.23 | |
40 | -##kombu==3.0.37 | |
41 | -##django-celery==3.1.17 | |
35 | +##celery>=3.1.23 | |
36 | +##flower>=0.9.2 | |
37 | +##amqp>=1.4.9 | |
38 | +##amqplib>=1.0.2 | |
39 | +##billiard>=3.3.0.23 | |
40 | +##kombu>=3.0.37 | |
41 | +##django-celery>=3.1.17 | |
42 | 42 | ... | ... |
install/requirements_dev.txt
... | ... | @@ -2,37 +2,38 @@ |
2 | 2 | # DEV only |
3 | 3 | # |
4 | 4 | |
5 | -django-debug-toolbar==3.2.2 | |
5 | +django-debug-toolbar==4.0.0 | |
6 | 6 | # Modifications 2021 : |
7 | 7 | # removing plantuml because we need a unofficial version (maybe we could force to go back on an old version where the bug wasn't happening |
8 | 8 | # added httplib2 which is needed for plantuml |
9 | 9 | # added dataclasses which was missing for the model controller script |
10 | 10 | #plantuml |
11 | + | |
11 | 12 | httplib2==0.20.2 |
12 | 13 | dataclasses==0.6 |
13 | 14 | # For YAML Config |
14 | 15 | pykwalify==1.8.0 |
15 | 16 | PyYAML==6.0 |
16 | 17 | # For SP TAC Assignation |
17 | -matplotlib==3.4.3 | |
18 | -numpy==1.21.4 | |
18 | +matplotlib==3.5.1 | |
19 | +numpy==1.24.3 | |
19 | 20 | |
20 | 21 | # For working with GIT within Python |
21 | -GitPython==3.1.24 | |
22 | +GitPython==3.1.31 | |
22 | 23 | # For working with date |
23 | 24 | python-dateutil==2.8.2 |
24 | 25 | |
25 | 26 | # For MCO CNES |
26 | 27 | |
27 | -astropy | |
28 | -photutils | |
29 | -scipy | |
28 | +astropy==5.2.1 | |
29 | +photutils==1.3.0 | |
30 | +scipy==1.10.1 | |
30 | 31 | |
31 | 32 | # for websocket |
32 | -channels | |
33 | -daphne | |
34 | -attrs==22.1.0 | |
35 | -channels_redis==3.4.1 | |
33 | +channels==4.0.0 | |
34 | +daphne==4.0.0 | |
35 | +attrs==23.1.0 | |
36 | +channels_redis==4.1.0 | |
36 | 37 | |
37 | 38 | # To generate API documentation |
38 | -uritemplate | |
39 | 39 | \ No newline at end of file |
40 | +uritemplate==4.1.1 | |
40 | 41 | \ No newline at end of file | ... | ... |