From 4844e17fde39e809160e75dc6e912bb6ef65c9fe Mon Sep 17 00:00:00 2001 From: Nex Sabre Date: Wed, 20 Jul 2022 15:21:30 +0200 Subject: [PATCH] Create a dockerfile and add cmds in the Makefile --- Dockerfile | 10 ++++++++++ Makefile | 10 +++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f097515 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM spack/ubuntu-jammy:latest + +# add Spack bin to the bash +RUN echo 'alias spack=/opt/spack/bin/spack' >> /root/.bashrc + +# install latest pip2spack +RUN python3 -m pip install --upgrade pip +RUN python3 -m pip install pip2spack + +ENTRYPOINT ["/bin/bash", "--rcfile", "/etc/profile", "-l"] diff --git a/Makefile b/Makefile index 3ea0557..3fe89fa 100644 --- a/Makefile +++ b/Makefile @@ -11,4 +11,12 @@ build: @echo "Building... Done" publish: - twine upload src/dist/* \ No newline at end of file + twine upload src/dist/* + +.PHONY: dbuild +dbuild: + docker build -t pip2spack . + +.PHONY: drun +drun: + docker run -it pip2spack