diff --git a/docker/ubuntu18.04/openmpi4.0.4/all_spack/Dockerfile.cv2 b/docker/ubuntu18.04/openmpi4.0.4/all_spack/Dockerfile.cv2 new file mode 100644 index 00000000..d569eaa5 --- /dev/null +++ b/docker/ubuntu18.04/openmpi4.0.4/all_spack/Dockerfile.cv2 @@ -0,0 +1,63 @@ +FROM chimbuko/chimbuko-spack-env:ubuntu18.04 + +RUN apt-get update && apt-get install -y emacs-nox gdb tmux vim + +WORKDIR /src + +RUN git clone https://github.com/CODARcode/PerformanceAnalysis.git \ + --branch ckelly_develop_ddb \ + && git -C PerformanceAnalysis checkout ckelly_develop_ddb \ + && cp -r PerformanceAnalysis/spack/repo/chimbuko /sds/ \ + && cp -r PerformanceAnalysis/benchmark_suite . + +ENV TAU_OPTIONS="-optShared -optRevert -optVerbose -optCompInst" + +WORKDIR /bld/benchmark_suite/func_multimodal + +RUN cp -s /src/benchmark_suite/func_multimodal/main.C . \ + && cp /src/benchmark_suite/func_multimodal/*.sh . \ + && cp /src/benchmark_suite/func_multimodal/Makefile . + +RUN source /spack/spack/share/spack/setup-env.sh \ + && cd /opt/spack-environment && spack env activate . \ + && cd - \ + && make + +COPY docker/ubuntu18.04/openmpi4.0.4/all_spack/env.yaml \ + /opt/spack-environment/spack.yaml + +RUN source /spack/spack/share/spack/setup-env.sh \ + && cd /opt/spack-environment \ + && spack env activate . \ + && spack concretize -f \ + && spack install \ + && spack gc -y \ + && spack clean -a + +RUN echo 0.1.9 +# Save build time while working on non-spack dependencies +RUN git config --global user.email "dblair@bnl.gov" \ + && git config --global user.name "Dakota Blair" +RUN git -C /src/PerformanceAnalysis pull --strategy-option=theirs + +COPY docker/ubuntu18.04/openmpi4.0.4/all_spack/chimbuko_config.sh \ + /bld/benchmark_suite/func_multimodal/ + +COPY scripts/docker/cv2/build.sh /build.spack.sh +RUN /build.spack.sh + +COPY scripts/docker/cv2/pip.sh /build.pip.sh +RUN /build.pip.sh + +COPY scripts/docker/cv2/rcfile.sh /rcfile.sh + +# ENTRYPOINT ["/bin/bash"] # see Dockerfile.spack_env + +CMD [ \ + "--rcfile", \ + "/rcfile.sh", \ + "-i", \ + "-c", \ + "/bld/benchmark_suite/func_multimodal/run.sh" \ +] + diff --git a/docker/ubuntu18.04/openmpi4.0.4/all_spack/README.md b/docker/ubuntu18.04/openmpi4.0.4/all_spack/README.md new file mode 100644 index 00000000..00b2c34a --- /dev/null +++ b/docker/ubuntu18.04/openmpi4.0.4/all_spack/README.md @@ -0,0 +1,34 @@ +# Dockerfiles + +## `Dockerfile.cv2` + +This Dockerfile defines an image which can be used to validate the visualization +package upgrades. The build will clone the `chimbuko-visualization2` (CV2) repository +and checkout the `dependency_upgrades` branch. Here is how to use this image to +test changes to CV2: + +1. Build the image. +2. Use `docker ps` to find an open port `HOST_PORT`. +3. Then running the image with the `HOST_PORT` will execute `run.sh` and start + the server simulation. +4. Load the frontend in a browser (`http://hostname:$HOST_PORT`). + +### Build the image. + +```sh +docker build \ + -f docker/ubuntu18.04/openmpi4.0.4/all_spack/Dockerfile.cv2 \ + -t chimbuko/chimbuko-cv2:ubuntu18.04 \ + . +``` + +### Run the image. + +```sh +docker run --rm -it --cap-add=SYS_PTRACE --security-opt seccomp=unconfined \ + -p $HOST_PORT:5002 \ + -v $(pwd):$(pwd) \ + -name test-cv2 \ + chimbuko/chimbuko-spack-dev:ubuntu18.04 +``` + diff --git a/docker/ubuntu18.04/openmpi4.0.4/all_spack/env.yaml b/docker/ubuntu18.04/openmpi4.0.4/all_spack/env.yaml index 6a1e1645..08eef4d2 100644 --- a/docker/ubuntu18.04/openmpi4.0.4/all_spack/env.yaml +++ b/docker/ubuntu18.04/openmpi4.0.4/all_spack/env.yaml @@ -3,7 +3,7 @@ spack: - chimbuko-performance-analysis @git.bcb0f724d8579abeb620a0f9f4a9fdd839f3475f ^mochi-sonata~bedrock~unqlite_st ^cmake@3.27.7 - tau+mpi+openmp+adios2+python+binutils@git.9ec064a2f5ebc6deb63cfb3c10595ccba902b017=2.33.1 - libfabric fabrics=sockets,tcp,udp,rxm - - chimbuko-visualization2 @git.8568d3c2ecdabfd61634a603e64e4a408cb731fc ^curl@8.4.0 ^python@3.8.18 ^py-cryptography@3.2.1 ^py-celery@4.4.7 ^py-flask@1.1.2 ^py-werkzeug@0.16.0 ^py-jinja2@2.11.3 ^py-itsdangerous@2.0.1 ^py-flask-sqlalchemy@2.5.1 ^py-wheel@0.37.1 ^py-eventlet@0.30.0 ^py-setuptools@65.5.0 + - chimbuko-visualization2 @git.dependency_upgrades=dev ^curl@8.4.0 ^python@3.8.18 concretizer: unify: true compilers: diff --git a/scripts/docker/cv2/build.sh b/scripts/docker/cv2/build.sh new file mode 100755 index 00000000..f8bfcf51 --- /dev/null +++ b/scripts/docker/cv2/build.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -eux + +source /spack/spack/share/spack/setup-env.sh +cd /opt/spack-environment/ +spack env activate . +spack develop chimbuko-visualization2 @git.dependency_upgrades=dev +spack concretize -f +spack install diff --git a/scripts/docker/cv2/pip.sh b/scripts/docker/cv2/pip.sh new file mode 100755 index 00000000..d4864d21 --- /dev/null +++ b/scripts/docker/cv2/pip.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -eux + +source /spack/spack/share/spack/setup-env.sh +cd /opt/spack-environment/ +spack env activate . +cd /opt/spack-environment/chimbuko-visualization2/ +python3 -m ensurepip +python3 -m pip install -r requirements.txt diff --git a/scripts/docker/cv2/rcfile.sh b/scripts/docker/cv2/rcfile.sh new file mode 100755 index 00000000..37fad125 --- /dev/null +++ b/scripts/docker/cv2/rcfile.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -eux + +source /spack/spack/share/spack/setup-env.sh +cd /opt/spack-environment/ +spack env activate . +export CHIMBUKO_VIZ_ROOT=$(spack location -i chimbuko-visualization2) +cd /bld/benchmark_suite/func_multimodal +set +ex diff --git a/spack/repo/chimbuko/packages/chimbuko-visualization2/package.py b/spack/repo/chimbuko/packages/chimbuko-visualization2/package.py index e1bae6aa..2373bbef 100644 --- a/spack/repo/chimbuko/packages/chimbuko-visualization2/package.py +++ b/spack/repo/chimbuko/packages/chimbuko-visualization2/package.py @@ -8,24 +8,27 @@ class ChimbukoVisualization2(Package): """The Visualization component of Chimbuko""" homepage = "https://github.com/CODARcode/ChimbukoVisualizationII" - git = "https://github.com/CODARcode/ChimbukoVisualizationII" + git = "https://github.com/dakotablair/ChimbukoVisualizationII" - version('master', branch='master') + version('dependency_upgrades', branch='dependency_upgrades') - depends_on('python@3:') + depends_on('python@3.8') depends_on('py-mochi-sonata', type=('build', 'run')) - depends_on('py-flask', type=('build', 'run')) - depends_on('py-flask-script', type=('build', 'run')) - depends_on('py-flask-sqlalchemy', type=('build', 'run')) - depends_on('py-flask-socketio', type=('build', 'run')) - depends_on('py-sqlalchemy', type=('build', 'run')) - depends_on('py-werkzeug', type=('build', 'run')) - depends_on('py-celery', type=('build', 'run')) - depends_on('py-gevent', type=('build', 'run')) + depends_on('py-celery@5.2.2:', type=('build', 'run')) + depends_on('py-certifi', type=('build', 'run')) + depends_on('py-dnspython', type=('build', 'run')) depends_on('py-eventlet', type=('build', 'run')) - depends_on('py-runstats', type=('build', 'run')) - depends_on('py-redis', type=('build', 'run')) + depends_on('py-flask-script', type=('build', 'run')) + depends_on('py-flask-socketio@2.9.6:2.9', type=('build', 'run')) + depends_on('py-flask-sqlalchemy@2.5.1:2.5', type=('build', 'run')) + depends_on('py-flask@=1.1.2', type=('build', 'run')) + depends_on('py-gevent@23.7.0:', type=('build', 'run')) + depends_on('py-idna', type=('build', 'run')) + depends_on('py-jinja2', type=('build', 'run')) depends_on('py-requests', type=('build','run')) + depends_on('py-runstats@1.8.0:', type=('build', 'run')) + depends_on('py-sqlalchemy@1.4.45:1.4', type=('build', 'run')) + depends_on('py-werkzeug@0.16.0:', type=('build', 'run')) depends_on('redis', type='run') depends_on('curl', type='run')