Skip to content

Commit 9b3ff94

Browse files
committed
fix install
1 parent e88032c commit 9b3ff94

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

Dockerfile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,9 @@ RUN apt-get update -qq \
8080
&& rm -rf ~/.cache/pip/*
8181
USER coder
8282
RUN echo ". $CONDA_DIR/etc/profile.d/conda.sh" >> ~/.profile
83-
RUN bash -c 'source "${CONDA_DIR}/etc/profile.d/conda.sh" && conda activate neuro && pip install -e /home/coder/project/[test]'
8483
USER root
84+
RUN bash -c 'source "${CONDA_DIR}/etc/profile.d/conda.sh" && conda activate neuro && pip install --no-cache-dir -e /home/coder/project/[test]'
85+
ENV PATH="/opt/miniconda-latest/envs/neuro/bin:/home/coder/.local/bin:$PATH"
8586
ENTRYPOINT ["/neurodocker/startup.sh", "xnat_downloader"]
8687

8788
# Save specification to JSON.
@@ -227,16 +228,22 @@ RUN printf '{ \
227228
"command": "echo \\". $CONDA_DIR/etc/profile.d/conda.sh\\" >> ~/.profile" \
228229
} \
229230
}, \
231+
{ \
232+
"name": "user", \
233+
"kwds": { \
234+
"user": "root" \
235+
} \
236+
}, \
230237
{ \
231238
"name": "run", \
232239
"kwds": { \
233-
"command": "bash -c '"'"'source \\"${CONDA_DIR}/etc/profile.d/conda.sh\\" && conda activate neuro && pip install -e /home/coder/project/[test]'"'"'" \
240+
"command": "bash -c '"'"'source \\"${CONDA_DIR}/etc/profile.d/conda.sh\\" && conda activate neuro && pip install --no-cache-dir -e /home/coder/project/[test]'"'"'" \
234241
} \
235242
}, \
236243
{ \
237-
"name": "user", \
244+
"name": "env", \
238245
"kwds": { \
239-
"user": "root" \
246+
"PATH": "/opt/miniconda-latest/envs/neuro/bin:/home/coder/.local/bin:$PATH" \
240247
} \
241248
}, \
242249
{ \

scripts/build_dockerfile.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ generate_docker(){
3030
conda_install='python=3.13' \
3131
--user=coder \
3232
--run 'echo ". $CONDA_DIR/etc/profile.d/conda.sh" >> ~/.profile' \
33-
--run-bash 'source "${CONDA_DIR}/etc/profile.d/conda.sh" && conda activate neuro && pip install -e /home/coder/project/[test]' \
3433
--user=root \
34+
--run-bash 'source "${CONDA_DIR}/etc/profile.d/conda.sh" && conda activate neuro && pip install --no-cache-dir -e /home/coder/project/[test]' \
35+
--env 'PATH=/opt/miniconda-latest/envs/neuro/bin:/home/coder/.local/bin:$PATH' \
3536
--entrypoint "/neurodocker/startup.sh xnat_downloader"
3637
# --shell "/bin/bash --login -c" \
3738
}

0 commit comments

Comments
 (0)