Dear Chris,

I’m forwarding the mail also to the deal.II usergroup, as many others may find 
this useful.

> On 4 Jan 2021, at 10:20, Christopher Ham <[email protected]> wrote:
> 
> Dear Both,
> 
> I wonder if you might be able to help me. I would really like to try
> out deal.ii. I am a bit of a novice with the computing side of things
> though. I have successfully downloaded Docker and pulled and run some
> of the deal.ii containers. However, I had some problems and I'd be
> really grateful for your help.
> 
> I first pulled dealii/dealii:latest. The /home/dealii/ folder was
> empty. I looked around in the file system and then used the find
> command but I could not find the examples folder.

This image is constructed using apt install procedure, which puts deal.II 
directly under /usr. Examples are *not* installed in this image.

This image is intended to be used by mounting some local volumes in the image, 
and then compiling using the docker environment. In general, you don’t want to 
modify the image itself under docker (i.e., compile the examples inside the 
docker image), since these changes in general get lost when you exit docker.

The library is installed directly in /usr, so you don’t need to specify 
anything at cmake configuration time, since it is picked up automatically. 


> I then pulled dealii/dealii:master-focal. I could find the examples
> folder in this container (I found two places where they were
> actually). However I got an error when I ran 'cmake .' I guess I need
> to specify the directory where deal.ii is installed but I don't know
> this.

The master-focal version is intended for development and developers. It is 
installed under /usr/local (and not under /usr), and it also includes the 
source files of the library in /usr/src/dealii (which indeed also include the 
examples), in order to allow debugging with gdb.

Notice, however, that if you run as the standard dealii user, you don’t have 
write access to /usr/local, nor to /usr/src/dealii.

You should copy those examples to a directory where you have write access (your 
home directory), or mount a local directory and use the docker environment to 
build. 

My suggestion is to do the following:

download the examples directory on your local machine (say under directory 
`pwd`/examples`), make it world writeable (chmod -R a+rw examples) and run 

docker run -t -i --rm -v `pwd`/examples:/home/dealii/examples 
dealii/dealii:master-focal bash

-t: let docker know you’ll be using a terminal
-i: run interactively
—rm: remove the intermediate images once you exit
-v `pwd`/examples:/home/dealii/examples: mount the local directory “examples” 
to a directory inside the docker directory /home/dealii/examples

this will drop you in the directory dealii, where now you have also a directory 
examples, to which you have write access.

Now you can cd in any of the examples directory, and you should be able to run 

cmake .
make run


Best,
Luca.


-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/62994202-6010-47C0-B718-56BDF800485E%40gmail.com.

Reply via email to