Skip to content

Commit

Permalink
Build in /odin in container
Browse files Browse the repository at this point in the history
This makes the paths to files in log messges nicer
  • Loading branch information
GDYendell committed Aug 2, 2024
1 parent 9e4fd02 commit 890c8d0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,17 @@ RUN git clone https://github.com/DiamondLightSource/hdf5filters.git && cd hdf5fi
FROM developer AS build

# fetch the source
WORKDIR /tmp/odin-data
WORKDIR /odin/odin-data
COPY . .

# C++
RUN mkdir /odin && \
mkdir -p build && cd build && \
RUN mkdir -p build && cd build && \
cmake -DCMAKE_INSTALL_PREFIX=/odin ../cpp && \
make -j8 VERBOSE=1 && \
make install

# Python
RUN python -m pip install /tmp/odin-data/python[meta_writer]
RUN python -m pip install /odin/odin-data/python[meta_writer]

# Runtime stage ################################################################
FROM common AS runtime
Expand All @@ -76,4 +75,6 @@ RUN add-apt-repository -y ppa:deadsnakes/ppa && \
COPY --from=build /odin /odin
COPY --from=build /venv /venv

RUN rm -rf /odin/odin-data /odin/odin-control /odin/hdf5filters

WORKDIR /odin

0 comments on commit 890c8d0

Please sign in to comment.