forked from isofit/isofit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
53 lines (44 loc) · 1.77 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
FROM rayproject/ray:2.4.0-py310-aarch64
USER root
RUN apt-get update &&\
apt-get install --no-install-recommends -y \
gfortran \
make \
unzip
USER ray
WORKDIR /home/ray
# Copy and install ISOFIT
COPY --chown=ray:users . isofit/
RUN conda update conda &&\
conda config --prepend channels conda-forge &&\
conda create --name isofit --clone base &&\
conda install --name base --solver=classic conda-libmamba-solver nb_conda_kernels jupyterlab &&\
conda env update --name isofit --solver=libmamba --file isofit/recipe/environment_isofit_basic.yml &&\
conda install --name isofit --solver=libmamba ipykernel &&\
anaconda3/envs/isofit/bin/pip install --no-deps -e isofit &&\
echo "conda activate isofit" >> ~/.bashrc
ENV LD_PRELOAD="/usr/lib/aarch64-linux-gnu/libgomp.so.1:$LD_PRELOAD"
# Install 6S
RUN mkdir 6sv-2.1 &&\
cd 6sv-2.1 &&\
wget https://github.com/ashiklom/isofit/releases/download/6sv-mirror/6sv-2.1.tar &&\
tar -xf 6sv-2.1.tar &&\
rm 6sv-2.1.tar &&\
sed -i Makefile -e 's/FFLAGS.*/& -std=legacy/' &&\
make
ENV SIXS_DIR="/home/ray/6sv-2.1"
# Install sRTMnet
RUN mkdir sRTMnet_v100 &&\
cd sRTMnet_v100 &&\
wget https://zenodo.org/record/4096627/files/sRTMnet_v100.zip &&\
unzip sRTMnet_v100.zip &&\
rm sRTMnet_v100.zip
ENV EMULATOR_PATH="/home/ray/sRTMnet_v100/sRTMnet_v100"
# Some ISOFIT examples require this env var to be present but does not need to be installed
ENV MODTRAN_DIR=""
# Explicitly set the shell to bash so the Jupyter server defaults to it
ENV SHELL=/bin/bash
# Start the Jupyterlab server
EXPOSE 8888
CMD jupyter-lab --ip 0.0.0.0 --no-browser --allow-root --NotebookApp.token='' --NotebookApp.password=''
# FROM alpine:3.14 AS build -- https://docs.docker.com/build/building/multi-stage/