Blame view

Dockerfile 3.85 KB
a6603b26   Alexis Koralewski   Django and Python...
1
FROM python:3.8
83cfb55c   Etienne Pallier   sphinx autodoc ge...
2

e4c37a1a   Alexis Koralewski   Upgrading mysql v...
3
ARG uid
5357999a   Alexis Koralewski   add Dockerfile
4
5

RUN apt-get update && apt-get install -y \
b183b691   akoralewski   add git on pyros ...
6
    default-mysql-client \
50cbd417   Alexis Koralewski   add nano and vi t...
7
8
    git \
    nano \
83cfb55c   Etienne Pallier   sphinx autodoc ge...
9
10
11
    vim

# DEV only
776d0b6c   Etienne Pallier   pyros v0.4
12
13
# for dot => PNG diagrams generation with pyreverse (pylint)
RUN apt-get install -y graphviz graphviz-dev
b183b691   akoralewski   add git on pyros ...
14

83cfb55c   Etienne Pallier   sphinx autodoc ge...
15
16
# Guitastro
RUN apt-get install -y \
776d0b6c   Etienne Pallier   pyros v0.4
17
	# - ASTROMETRY.NET (in order to process images locally, without having to send (big) images to astrometry.net)
83cfb55c   Etienne Pallier   sphinx autodoc ge...
18
19
20
21
22
23
24
25
	astrometry.net astrometry-data-tycho2
	#astrometry-data-2mass
	# - PIL
	#python3-pil python3-pil.imagetk
	#python3-venv
	#python3-pip

# - INDI => for Guitastro
79db9a00   Etienne Pallier   updated Dockerfil...
26
# https://indilib.org/get-indi/download-ubuntu.html
83cfb55c   Etienne Pallier   sphinx autodoc ge...
27
28
# For apt-add-repository :
RUN apt-get install -y software-properties-common
776d0b6c   Etienne Pallier   pyros v0.4
29
# Add repository
83cfb55c   Etienne Pallier   sphinx autodoc ge...
30
RUN apt-add-repository ppa:mutlaqja/ppa
776d0b6c   Etienne Pallier   pyros v0.4
31
# Add public key for this repo
79db9a00   Etienne Pallier   updated Dockerfil...
32
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 487CEC2B3F33A288
776d0b6c   Etienne Pallier   pyros v0.4
33
#RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 487CEC2B3F33A288
79db9a00   Etienne Pallier   updated Dockerfil...
34
35
36
#RUN apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 487CEC2B3F33A288
#RUN apt-key adv --keyserver http://ppa.launchpad.net/mutlaqja/ppa/ubuntu/dists/jammy --recv-keys 487CEC2B3F33A288
#RUN apt-key adv --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys 487CEC2B3F33A288
83cfb55c   Etienne Pallier   sphinx autodoc ge...
37
#10 1.751 E: The repository 'http://ppa.launchpad.net/mutlaqja/ppa/ubuntu jammy InRelease' is not signed.
79db9a00   Etienne Pallier   updated Dockerfil...
38
RUN apt-get update 
83cfb55c   Etienne Pallier   sphinx autodoc ge...
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
#RUN apt-get install -y indi-full
#RUN apt-get install -y gsc
#RUN apt-get install -y kstars-bleeding
#RUN apt-get install -y libindi1
#RUN apt-get install -y indi-bin
#RUN apt-get install -y swig
#RUN apt-get install -y libz3-dev
#RUN apt-get install -y libcfitsio-dev
#RUN apt-get install -y libnova-dev
#RUN apt-get install -y libindi-dev
# Obligatoire ?
#RUN pip install --user --install-option="--prefix=" pyindi-client

# - ASTAP (Astrometry) => for Guitastro
# Download .deb file from https://www.hnsky.org/astap.htm
RUN apt-get install -y wget 
RUN wget https://www.hnsky.org/astap_amd64.deb
RUN apt-get install -y ./astap_amd64.deb
RUN rm ./astap_amd64.deb

# - PYLON (Cameras BASLER) => for Guitastro
# https://www.baslerweb.com/en/products/software/basler-pylon-camera-software-suite/
# pylon_6.3.0.23157_x86_64_setup.tar.gz
# tar -xvf pylon_6.3.0.23157_x86_64_setup.tar.gz
# copier le fichier pylon_6.3.0.23157_x86_64.tar.gz à l’endroit où installer le logiciel.
# tar -xvf pylon_6.3.0.23157_x86_64.tar.gz
# apt-get install ./pylon_6.3.0.23157-deb0_amd64.deb

# Guitastro DEV only

# - ANACONDA / SPYDER
# https://www.anaconda.com/products/individual
# Install spyder

# - DOCUMENT GENERATION
# apt-get install python3-sphinx
# apt install spyder
# apt install graphviz libgraphviz-dev



b183b691   akoralewski   add git on pyros ...
80
81
82
# Get IRAP self signed certificate
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

e4c37a1a   Alexis Koralewski   Upgrading mysql v...
83
RUN echo "$uid" > test.txt
dc729fe1   Etienne Pallier   Sphinx autodoc ge...
84
# Adding new user (pyros_user) and creating his home folder
e4c37a1a   Alexis Koralewski   Upgrading mysql v...
85
RUN useradd --create-home --shell /bin/bash pyros_user --uid $uid
5357999a   Alexis Koralewski   add Dockerfile
86
87
88
89
90

# Create the work dir and set permissions as pyros_user 
RUN mkdir -p /home/pyros_user/app/ && chown -R pyros_user:pyros_user /home/pyros_user/app
WORKDIR /home/pyros_user/app

dc729fe1   Etienne Pallier   Sphinx autodoc ge...
91
# Switch from root to pyros_user
5357999a   Alexis Koralewski   add Dockerfile
92
93
USER pyros_user

a6603b26   Alexis Koralewski   Django and Python...
94
95
RUN pip install --user --upgrade pip
RUN pip install --user wheel
83cfb55c   Etienne Pallier   sphinx autodoc ge...
96
# TODO: pourquoi numpy ??? A virer ?
a6603b26   Alexis Koralewski   Django and Python...
97
RUN pip install --user numpy
83cfb55c   Etienne Pallier   sphinx autodoc ge...
98

dc729fe1   Etienne Pallier   Sphinx autodoc ge...
99
# Copy local host machine files to image
699871e9   Alexis Koralewski   adding bin to pat...
100
COPY --chown=pyros_user:pyros_user . .
dc729fe1   Etienne Pallier   Sphinx autodoc ge...
101
102
103
104
# Copy some aliases
RUN cp .bash_aliases ..
#RUN mv .bash_aliases ..
#COPY --chown=pyros_user:pyros_user .bash_aliases ..
699871e9   Alexis Koralewski   adding bin to pat...
105

dc729fe1   Etienne Pallier   Sphinx autodoc ge...
106
# Adding local/bin to path to avoid pip warning
699871e9   Alexis Koralewski   adding bin to pat...
107
108
ENV PATH "$PATH:/home/pyros_user/.local/bin"

dc729fe1   Etienne Pallier   Sphinx autodoc ge...
109
# Installing click on the image to prevent error on the first execution of the installation script
699871e9   Alexis Koralewski   adding bin to pat...
110
111
RUN pip install --user click

dc729fe1   Etienne Pallier   Sphinx autodoc ge...
112
# Installing packages required for PyROS
12ddccd6   Etienne Pallier   sphinx doc auto g...
113
RUN pip install --user -r ./install/requirements.txt
2b4e74ac   Etienne Pallier   sphinx autodoc v5
114
RUN pip install --user -r ./install/requirements_dev.txt