Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use poetry for python dependencies #72

Merged
merged 1 commit into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ EOF
# Strip all the binaries
#RUN find -L /spack/opt/spack -type f -exec readlink -f '{}' \; | xargs file -i | grep 'charset=binary' | grep 'x-executable\|x-archive\|x-sharedlib' | awk -F: '{print $1}' | xargs strip -S

RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/usr/local python3 -

RUN sed -i 's/ exec "\/bin\/bash"/ exec "\/bin\/bash" "-l"/g' /opt/nvidia/nvidia_entrypoint.sh \
&& sed -i 's/ exec "$@"/ exec "\/bin\/bash" "-l" "-c" "$*"/g' /opt/nvidia/nvidia_entrypoint.sh

Expand Down Expand Up @@ -62,7 +64,6 @@ ENV OPTICKS_PREFIX=/usr/local/opticks
ENV OPTICKS_CUDA_PREFIX=/usr/local/cuda
ENV OPTICKS_OPTIX_PREFIX=${OPTIX_DIR}
ENV OPTICKS_COMPUTE_CAPABILITY=89
ENV PYTHONPATH=${OPTICKS_HOME}
ENV LD_LIBRARY_PATH=${OPTICKS_PREFIX}/lib:${LD_LIBRARY_PATH}
ENV PATH=${OPTICKS_PREFIX}/lib:${PATH}
ENV NVIDIA_DRIVER_CAPABILITIES=graphics,compute,utility
Expand All @@ -74,7 +75,9 @@ COPY epic epic
COPY opticks opticks
COPY patches patches
COPY tests tests
COPY README.md .
COPY NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh .
COPY pyproject.toml .

RUN patch -p1 opticks/sysrap/sevt.py patches/opticks-fix-update-array-dtype-for-numpy-1.26.patch

Expand All @@ -86,3 +89,5 @@ EOF
RUN mkdir -p $OPTIX_DIR && ./NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh --skip-license --prefix=$OPTIX_DIR
RUN opticks-full
RUN rm -fr $OPTIX_DIR/* $ESI_DIR/NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh

RUN poetry install
17 changes: 17 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[tool.poetry]
name = "esi-shell"
version = "0.0.0-beta"
description = ""
authors = ["BNL NPPS"]
readme = "README.md"
packages = [{include = "opticks"}]

[tool.poetry.dependencies]
python = "^3.10"
ipython = "^8.24.0"
numpy = "^1.26.4"
pyvista = "^0.43.8"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"