Docker question - bash: cmake: command not found

1,015 views
Skip to first unread message

Yuxiang Wang

unread,
Jul 13, 2018, 2:21:28 PM7/13/18
to deal.II User Group
(re-post from https://github.com/dealii/docker-files/issues/17)

Hi all,


Quick question - after I used this docker image:


docker run -v %cd%:/home/dealii/shared -it dealii/dealii:9.0.0-gcc-mpi-fulldepsspack-debugrelease


And if I run cmake CMakeLists.txt, it reports:


bash: cmake: command not found


It seems that cmake is not installed. And if I do sudo apt-get install cmake it says bash: sudo: command not found; if I do su it asks for a password that I don't know.


Could you please help?


Thanks,
Shawn

luca.heltai

unread,
Jul 13, 2018, 5:25:29 PM7/13/18
to Deal.II Users
spack comes with its own cmake.

Try

spack load cmake

first…

L.
> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
> ---
> You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Yuxiang Wang

unread,
Jul 13, 2018, 9:30:52 PM7/13/18
to deal.II User Group
Hi,

It says command not found -

dealii@18522844b04f:~/shared/VS2017WSL$ . /usr/local/share/spack/setup-env.sh
dealii@18522844b04f:~/shared/VS2017WSL$ spack load cmake
bash: module: command not found

Maybe I was doing something wrong. Could you please help check the above commands?

Shawn

luca.heltai

unread,
Jul 16, 2018, 6:11:37 AM7/16/18
to Deal.II Users
I’ve updated the docker images to also include the module command.

Can you see if it works for you now?


. /usr/local/share/spack/setup-env.sh
spack load cmake ninja dealii

should allow you to compile your programs.

Best,
Luca.

程迪

unread,
Aug 8, 2018, 1:12:11 AM8/8/18
to deal.II User Group
Hi Shawn,

I think `docker exec -u root -it <container name or ID> bash` would help you get root privilege and install cmake.
Reply all
Reply to author
Forward
0 new messages