@@ -3,6 +3,19 @@ FROM ubuntu:18.04
33
44USER root
55
6+ ENV ND_ENTRYPOINT="/neurodocker/startup.sh"
7+
8+ RUN export ND_ENTRYPOINT="/neurodocker/startup.sh" \
9+ && mkdir -p /neurodocker \
10+ && if [ ! -f "$ND_ENTRYPOINT" ]; then \
11+ echo '#!/usr/bin/env bash' >> "$ND_ENTRYPOINT" \
12+ && echo 'set -e' >> "$ND_ENTRYPOINT" \
13+ && echo 'export USER="${USER:=`whoami`}"' >> "$ND_ENTRYPOINT" \
14+ && echo 'source activate accel' >> "$ND_ENTRYPOINT" \
15+ && echo 'if [ -n "$1" ]; then "$@"; else /usr/bin/env bash; fi' >> "$ND_ENTRYPOINT"; \
16+ fi \
17+ && chmod -R 777 /neurodocker && chmod a+s /neurodocker
18+
619# Get base utilities
720RUN apt-get update \
821 && apt-get -y install curl \
@@ -11,14 +24,15 @@ RUN apt-get update \
1124# Conda install
1225ENV PATH="/opt/miniconda-latest/bin:$PATH"
1326
27+ RUN useradd --create-home --shell /bin/bash coder
28+ USER coder
29+
1430RUN export PATH="/opt/miniconda-latest/bin:$PATH" \
1531 && conda_installer="/tmp/miniconda.sh" \
1632 && curl -fsSL --retry 5 -o "$conda_installer" https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \
1733 && bash "$conda_installer" -b -p /opt/miniconda-latest
1834
1935
20- RUN useradd --create-home --shell /bin/bash coder
21- USER coder
2236RUN mkdir /home/coder/projects
2337WORKDIR /home/coder/projects
2438
@@ -29,4 +43,4 @@ RUN conda env create -f environment.yml
2943RUN bash -c 'conda init && . /home/coder/.bashrc && . activate accel && pip install -e /home/coder/projects'
3044
3145# Run as executable
32- ENTRYPOINT ["conda ", "run", "-n", "accel", "python", "/home/coder/projects/accel_code/run.py "]
46+ ENTRYPOINT ["/neurodocker/startup.sh ", "accel_transform "]
0 commit comments