diff --git a/.github/workflows/build_and_push.yaml b/.github/workflows/build_and_push.yaml index 431af36..a90bd82 100644 --- a/.github/workflows/build_and_push.yaml +++ b/.github/workflows/build_and_push.yaml @@ -1,10 +1,5 @@ name: Build And Push on: - push: - branches: - - 'main' - paths: - - Dockerfile workflow_dispatch: jobs: diff --git a/Dockerfile b/Dockerfile index a72ab8e..b8cd99c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM gcc:14.2.0@sha256:4f7f4804d6fa49c371f0f3f54e72a352d865baa6917e79cff63d2b860c53197b AS builder +FROM gcc:14.2.0@sha256:4f7f4804d6fa49c371f0f3f54e72a352d865baa6917e79cff63d2b860c53197b RUN apt-get update && \ apt-get install -y \ @@ -7,25 +7,24 @@ RUN apt-get update && \ libblosc-dev=1.21.3+ds-1 \ cmake=3.25.1-1 \ python3-pybind11=2.10.3-1 \ - python3-dev=3.11.2-1+b1 \ + # TODO: Split to multistage build python3-venv=3.11.2-1+b1 \ python3-pip=23.0.1+dfsg-1 RUN git clone https://github.com/AcademySoftwareFoundation/openvdb.git && \ cd openvdb && \ - git checkout a759e477aad3f305585ae85c6c723769a7e5f2cf && \ mkdir build && \ cd build && \ - cmake .. -DOPENVDB_BUILD_PYTHON_MODULE=ON -DUSE_NUMPY=ON && \ + cmake .. -D OPENVDB_BUILD_PYTHON_MODULE=ON -D USE_NUMPY=ON && \ make && \ make install RUN useradd -ms /bin/bash nonroot -WORKDIR /home/nonroot - USER nonroot +WORKDIR /home/nonroot + COPY neurovolume_deps.txt . # This path doesn't exist yet; we create it in the next layer @@ -35,4 +34,6 @@ RUN python3 -m venv .venv && \ # TODO: Parametrize? pip install -r neurovolume_deps.txt +ENV PYTHONPATH="/openvdb/build/openvdb/openvdb/python" + ENTRYPOINT [ "sleep", "infinity" ] \ No newline at end of file diff --git a/README.md b/README.md index ca23ed6..d577106 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,10 @@ To do so using [act](https://github.com/nektos/act): - navigate to `openvdb_docker` - run `act -j build` +# Commit Notes +Returing to dockerfile from commit `25e3169feac1c34c236ca0ee8f98d159e4ef78c6` as current multi-stage builds were proving problematic. This is a minimum viable product for Neurovolume. +Github actions have changed to `workflow_dispatch` only. + # To Do ## Dev and Build - [ ] Configure the Dev Container with Python