-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.light
81 lines (64 loc) · 2.98 KB
/
Dockerfile.light
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
FROM python:3.10
USER root
# Install r-lang and kernel
RUN apt update && \
apt install -y r-base r-cran-irkernel \
graphviz libgraphviz-dev \
libevent-core-2.1-7 libevent-pthreads-2.1-7 \
lsof && \
apt clean -y && \
apt autoclean -y \
apt autoremove -y
RUN apt-get install -y build-essential make gcc g++ git gfortran npm \
gdal-bin libgdal-dev python3-all-dev libspatialindex-dev && \
npm install -g typescript
ENV CPLUS_INCLUDE_PATH=/usr/include/gdal
ENV C_INCLUDE_PATH=/usr/include/gdal
# Switch to non-root user. It is crucial for security reasons to not run jupyter as root user!
RUN useradd -m jupyter
USER jupyter
# Install PyCIEMSS from GitHub
RUN pip install --no-cache-dir git+https://github.com/ciemss/pyciemss.git@adeb6b974746f86b20597e3d037041121e8ac9c9 --use-pep517
# Install MIRA from GitHub
RUN git clone https://github.com/indralab/mira.git /home/jupyter/mira
WORKDIR /home/jupyter/mira
RUN git reset --hard 6683922c3c94fdd300eb3b81789328701a0ec876
RUN pip install --no-cache-dir /home/jupyter/mira/"[ode,tests,dkg-client,dkg-construct,sbml,docs]" && \
rm -r /home/jupyter/mira
# Install Gilda - Mira Dependency
RUN pip install gilda==1.2.1
#### START Installs for PySB context
# Install project requirements
USER root
WORKDIR /tmp
RUN wget https://github.com/RuleWorld/bionetgen/releases/download/BioNetGen-2.9.2/BioNetGen-2.9.2-linux.tar.gz && \
tar -xzf BioNetGen-2.9.2-linux.tar.gz && \
mv BioNetGen-2.9.2 /usr/local/share/BioNetGen && \
rm BioNetGen-2.9.2-linux.tar.gz
WORKDIR /opt/stochkit
ENV STOCHKIT_HOME=/opt/stochkit
RUN git clone https://github.com/StochSS/StochKit.git /opt/stochkit
RUN bash ./install.sh
USER jupyter
ENV PATH=$PATH:$STOCHKIT_HOME/bin
RUN pip install --no-cache-dir beaker-pysb
#### END Installs for PySB context
# Install project requirements
COPY --chown=1000:1000 pyproject.toml README.md hatch_build.py /home/jupyter/askem_beaker/
RUN mkdir -p /home/jupyter/askem_beaker/src/askem_beaker && touch /home/jupyter/askem_beaker/src/askem_beaker/__init__.py
RUN pip install --no-cache-dir --upgrade -e /home/jupyter/askem_beaker
# Bootstrap MIRA runtime dependencies, these are lazily downloaded but we will get them ahead of time to avoid quirky
# interfacing issues across jupyter messaging
RUN python -c "from pyobo import Term, Reference, Obo"
COPY --chown=1000:1000 . /home/jupyter/askem_beaker/
# Installs the askem specific subkernels
RUN pip install --no-cache-dir --upgrade /home/jupyter/askem_beaker
#WORKDIR /askem_beaker
WORKDIR /home/jupyter
RUN unzip /home/jupyter/askem_beaker/resources/chromadb_functions_mira.zip \
&& mv /home/jupyter/chromadb_functions /home/jupyter/chromadb_functions_mira && ls
RUN unzip /home/jupyter/askem_beaker/resources/chromadb_functions_chirho.zip \
&& mv /home/jupyter/chromadb_functions /home/jupyter/chromadb_functions_chirho && ls
RUN mkdir /home/jupyter/workspace
WORKDIR /home/jupyter/workspace
CMD ["python", "-m", "beaker_kernel.server.main", "--ip", "0.0.0.0"]