Skip to content

Commit bc5464c

Browse files
committed
Ensure that environment is activated correctly in startup script
1 parent 10383a4 commit bc5464c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ COPY environment.yml .
77

88
RUN conda env create -f environment.yml
99

10-
RUN echo "source activate $(grep -m 1 -E 'name: *' environment.yml | cut -d' ' -f2)" \
10+
RUN echo "source activate $(grep -m 1 -E '^name: *' environment.yml | cut -d' ' -f2)" \
1111
> ~/.bashrc
1212

13-
SHELL ["conda", "run", "-n", \
14-
"$(grep -m 1 -E 'name: *' environment.yml | cut -d' ' -f2)", "/bin/bash", "-c"]
13+
SHELL ["/bin/bash", "-c"]
1514

1615
# Open a shell by default when the container is run interactively
17-
ENTRYPOINT ["bash"]
16+
ENTRYPOINT ["bash", "-l"]

0 commit comments

Comments
 (0)