forked from kristinemlarson/gnssrefl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (40 loc) · 1.75 KB
/
Dockerfile
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
FROM python:3.8-slim-buster
LABEL maintainer="EARTHSCOPE"
ARG DEBIAN_FRONTEND=noninteractive
ARG TARGETARCH
# build requirements
RUN apt-get update && \
apt-get install -y gfortran python3-pip unzip wget vim
## executables
RUN mkdir -p /etc/gnssrefl/exe /etc/gnssrefl/orbits /etc/gnssrefl/refl_code/Files /etc/gnssrefl/notebooks
COPY vendor/gfzrnx_2.0-8219_armlx64 /etc/gnssrefl/exe/
COPY vendor/gfzrnx_2.0-8219_lx64 /etc/gnssrefl/exe/
RUN if [ "$TARGETARCH" = "arm64" ] ; then \
cp /etc/gnssrefl/exe/gfzrnx_2.0-8219_armlx64 /etc/gnssrefl/exe/gfzrnx; else \
cp /etc/gnssrefl/exe/gfzrnx_2.0-8219_lx64 /etc/gnssrefl/exe/gfzrnx; \
fi
RUN chmod +x /etc/gnssrefl/exe/gfzrnx
COPY vendor/crx2rnx.c /etc/gnssrefl/exe/
COPY vendor/rnx2crx.c /etc/gnssrefl/exe/
RUN cd /etc/gnssrefl/exe && \
gcc -ansi -O2 crx2rnx.c -o CRX2RNX \
&& gcc -ansi -O2 rnx2crx.c -o RNX2CRX
ENV PATH="/etc/gnssrefl/exe:$PATH"
RUN pip install numpy --upgrade --ignore-installed
COPY pyproject.toml README.md setup.py /usr/src/gnssrefl/
COPY gnssrefl /usr/src/gnssrefl/gnssrefl
COPY notebooks/learn-the-code /etc/gnssrefl/notebooks/learn-the-code
COPY notebooks/use-cases /etc/gnssrefl/notebooks/use-cases
RUN pip3 install --no-cache-dir /usr/src/gnssrefl
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
ENV EXE=/etc/gnssrefl/exe
ENV ORBITS=/etc/gnssrefl/refl_code
#ENV ORBITS=/etc/gnssrefl/orbits
ENV REFL_CODE=/etc/gnssrefl/refl_code
ENV DOCKER=true
# i don't believe these commands do anything useful.
RUN mkdir -p /etc/gnssrefl/refl_code/input/
RUN cp /usr/src/gnssrefl/gnssrefl/gpt_1wA.pickle /etc/gnssrefl/refl_code/input/
RUN cp /usr/src/gnssrefl/gnssrefl/station_pos.db /etc/gnssrefl/refl_code/Files/
RUN cp /usr/src/gnssrefl/gnssrefl/station_pos_2024.db /etc/gnssrefl/refl_code/Files/
WORKDIR /usr/src/gnssrefl