Skip to content

Commit

Permalink
add merlin without flux
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <[email protected]>
  • Loading branch information
vsoch committed Oct 24, 2023
1 parent f0b1f5b commit 4630138
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-merlin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
strategy:
fail-fast: false
matrix:
container: [["merlin-demos/Dockerfile", 'ghcr.io/rse-ops/merlin-demos:merlin'],
container: [["merlin-demos/Dockerfile", 'ghcr.io/rse-ops/merlin-demos:merlin']
["merlin-demos/Dockerfile.flux", 'ghcr.io/rse-ops/merlin-demos-flux:merlin'],
["merlin-demos/Dockerfile.rabbitmq", 'ghcr.io/rse-ops/merlin-demos:rabbitmq'],
["merlin-demos/Dockerfile.redis", 'ghcr.io/rse-ops/merlin-demos:redis'],
["merlin-demos-certs/Dockerfile", 'ghcr.io/rse-ops/merlin-demos-certs:merlin'],
Expand Down
13 changes: 6 additions & 7 deletions merlin-demos/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/rse-ops/flux-conda:mamba
FROM ubuntu:latest

# docker compose build
# docker compose up -d
Expand All @@ -9,7 +9,6 @@ FROM ghcr.io/rse-ops/flux-conda:mamba

# workdir: /workflow

USER root
RUN apt-get update
RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install \
curl \
Expand All @@ -18,31 +17,31 @@ RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install \
liblzma-dev \
libcurl4-openssl-dev \
libncurses5-dev \
python3-pip \
git \
&& apt-get clean \
&& apt-get autoremove \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Wrappers to ensure we source the mamba environment!
USER fluxuser
WORKDIR /workflow
ENV PATH=$PATH:/home/fluxuser/.local/bin

# Merlin from pip doesn't have flux completely implemented
RUN git clone --depth 1 https://github.com/LLNL/merlin /tmp/merlin && \
cd /tmp/merlin && \
pip install .

RUN merlin config --broker redis && \
rm /home/fluxuser/.merlin/app.yaml
rm /root/.merlin/app.yaml

# Install spellbuild
RUN git clone --depth 1 https://github.com/LLNL/merlin-spellbook /tmp/spellbook && \
cd /tmp/spellbook && \
pip install .

# Updated app yaml
COPY ./merlinu/app.yaml /home/fluxuser/.merlin/app.yaml
COPY ./merlinu/rabbit.pass /home/fluxuser/.merlin/rabbit.pass
COPY ./merlinu/app.yaml /root/.merlin/app.yaml
COPY ./merlinu/rabbit.pass /root/.merlin/rabbit.pass

# Entrypoint to keep container running!
ENTRYPOINT ["tail", "-f", "/dev/null"]
48 changes: 48 additions & 0 deletions merlin-demos/Dockerfile.flux
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
FROM ghcr.io/rse-ops/flux-conda:mamba

# docker compose build
# docker compose up -d
# docker exec -it <merlin container> bash
# command with flux: flux start --test-size=4
# merlin run feature_demo/feature_demo.yaml
# merlin run-workers feature_demo/feature_demo.yaml

# workdir: /workflow

USER root
RUN apt-get update
RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install \
curl \
redis \
libbz2-dev \
liblzma-dev \
libcurl4-openssl-dev \
libncurses5-dev \
&& apt-get clean \
&& apt-get autoremove \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Wrappers to ensure we source the mamba environment!
USER fluxuser
WORKDIR /workflow
ENV PATH=$PATH:/home/fluxuser/.local/bin

# Merlin from pip doesn't have flux completely implemented
RUN git clone --depth 1 https://github.com/LLNL/merlin /tmp/merlin && \
cd /tmp/merlin && \
pip install .

RUN merlin config --broker redis && \
rm /home/fluxuser/.merlin/app.yaml

# Install spellbuild
RUN git clone --depth 1 https://github.com/LLNL/merlin-spellbook /tmp/spellbook && \
cd /tmp/spellbook && \
pip install .

# Updated app yaml
COPY ./merlinu/app.yaml /home/fluxuser/.merlin/app.yaml
COPY ./merlinu/rabbit.pass /home/fluxuser/.merlin/rabbit.pass

# Entrypoint to keep container running!
ENTRYPOINT ["tail", "-f", "/dev/null"]
4 changes: 0 additions & 4 deletions merlin-demos/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@ services:
ports:
- "6379:6379"
tty: true
ports:
- "6379:6379"
volumes:
- ./merlinu/cert_redis/:/cert_redis/
networks:
- mernet
networks:
- rabbitmq

Expand Down

0 comments on commit 4630138

Please sign in to comment.