-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
62 lines (47 loc) · 2.27 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
52
53
54
55
56
57
58
59
60
61
62
# Start from the jupyter/scipy-notebook image, which includes....
# python3, scipy, pandas, matplotlib, ipywidgets (activated), numba, hdf5, etc...
# For more information... https://hub.docker.com/r/jupyter/scipy-notebook/dockerfile
FROM jupyter/scipy-notebook
WORKDIR /home/jovyan/gnssrefl_jupyter
LABEL maintainer="UNAVCO Inc."
USER root
RUN apt-get update && \
apt-get install -y gcc && \
apt-get install -y gfortran && \
apt-get install -y unzip && \
apt-get install -y wget && \
apt-get install -y vim && \
rm -rf /var/lib/apt/lists/*
# COPY the bin folder (code that should not be edited by the user) into the docker
COPY --chown=$NB_UID:users /bin /home/jovyan/gnssrefl_jupyter/bin
RUN chmod +x /home/jovyan/gnssrefl_jupyter/bin/*
ENV PYTHONPATH "${PYTHONPATH}:/home/jovyan/gnssrefl_jupyter/bin"
RUN wget https://terras.gsi.go.jp/ja/crx2rnx/RNXCMP_4.1.0_src.tar.gz \
&& tar -xf RNXCMP_4.1.0_src.tar.gz \
&& gcc -ansi -O2 RNXCMP_4.1.0_src/source/crx2rnx.c -o CRX2RNX \
&& mv CRX2RNX /home/jovyan/gnssrefl_jupyter/bin/exe \
&& rm -rf RNXCMP*
# Copy the data directory
COPY --chown=$NB_UID:users /data /home/jovyan/gnssrefl_jupyter/data
RUN chmod +x /home/jovyan/gnssrefl_jupyter/data/*
ENV PYTHONPATH "${PYTHONPATH}:/home/jovyan/gnssrefl_jupyter/data"
# Copy the orbits directory
COPY --chown=$NB_UID:users /orbits /home/jovyan/gnssrefl_jupyter/orbits
ENV PYTHONPATH "${PYTHONPATH}:/home/jovyan/gnssrefl_jupyter/orbits"
ENV ORBITS=/home/jovyan/gnssrefl_jupyter/orbits
ENV REFL_CODE=/home/jovyan/gnssrefl_jupyter
ENV EXE=/home/jovyan/gnssrefl_jupyter/bin/exe
ENV DOCKER=true
# Change user to default jupyter user (from jupyter/scipy-notebook Dockerfile)
USER $NB_UID
# Install packages with pip
COPY --chown=${NB_UID}:${NB_GID} requirements.txt /tmp/
RUN pip3 install --quiet --no-cache-dir --requirement /tmp/requirements.txt && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"
RUN pip3 install numpy --upgrade
RUN mkdir Files
COPY notebooks/homework/* /home/jovyan/gnssrefl_jupyter/notebooks/homework/
COPY notebooks/use-cases/* /home/jovyan/gnssrefl_jupyter/notebooks/use-cases/
# Start the jupyter notebook upon executuion
ENTRYPOINT ["jupyter", "notebook", "--ip=*", "--allow-root", "--notebook-dir=/home/jovyan/gnssrefl_jupyter"]