Skip to content

Commit

Permalink
Merge pull request #308 from fjebaker/devel
Browse files Browse the repository at this point in the history
docker: fix PYTHONPATH with entrypoint
  • Loading branch information
kpeeters authored Aug 9, 2024
2 parents 31ca862 + 80ac8e6 commit 481aafe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ COPY --from=builder /usr/local/share/jupyter/kernels/cadabra2 /usr/local/share/j
# Cleanup things not necessary for running the container.
RUN apt-get remove -y gcc && apt-get autoremove -y

ENV PYTHONPATH=${PYTHONPATH}:/usr/local/lib/python3.11/dist-packages
EXPOSE 9057
WORKDIR /home/cadabra
ENTRYPOINT ["jupyter", "notebook", "--ip=0.0.0.0", "--port=9057", "--allow-root"]
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh", "--port=9057"]
5 changes: 5 additions & 0 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

# amend python path
export PYTHONPATH=${PYTHONPATH}:/usr/local/lib/python3.11/dist-packages
jupyter notebook --ip=0.0.0.0 --allow-root $@

0 comments on commit 481aafe

Please sign in to comment.