Super cool to see the fractal-containers repo! I'm working through the setup and will add some notes on things I had to figure out or errors I ran into. It's from a total docker novice, but that may also be some of the future target audience 😅
Overall, I was super impressed to be able to get Fractal running in this mode and (once all the setup was there), start the whole framework with a simple make run, then just go to the web server. I couldn't get it all running, but still super impressive to see!
1. Install docker & set it up correctly.
It's obvious, but should be mentioned somewhere if we expect a broader audience to run this as a demo.
I was messing about with trying to brew install docker and get it running. Couldn't get that to work though (see notes below), so I fell back on installing the desktop app.
2. Provide the login credentials
Fractal web requires you log in. Apparently, we're using the default credentials here:
Username: admin@fractal.xy
Password: 1234
We should specify this in the README, otherwise users get stuck on the login page :)
Where I got stuck
Task installation seems to get a bit tricky. At first, I struggle with figuring out which Python version to use (3.9 and 3.10 were not available in the container. But 3.11 was available.
The larger issue is that we're running into a bug while installing imagecodecs:
Compiling imagecodecs/_aec.pyx because it changed.
[1/1] Cythonizing imagecodecs/_aec.pyx
building 'imagecodecs._aec' extension
creating build/temp.linux-aarch64-cpython-311
creating build/temp.linux-aarch64-cpython-311/imagecodecs
gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iimagecodecs -I/home/fractal-share/tasks/.fractal/fractal-tasks-core0.10.1/venv/include -I/usr/local/include/python3.11 -I/tmp/pip-build-env-g4bzjo3a/overlay/lib/python3.11/site-packages/numpy/core/include -c imagecodecs/_aec.c -o build/temp.linux-aarch64-cpython-311/imagecodecs/_aec.o
In file included from /tmp/pip-build-env-g4bzjo3a/overlay/lib/python3.11/site-packages/numpy/core/include/numpy/ndarraytypes.h:1929,
from /tmp/pip-build-env-g4bzjo3a/overlay/lib/python3.11/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /tmp/pip-build-env-g4bzjo3a/overlay/lib/python3.11/site-packages/numpy/core/include/numpy/arrayobject.h:5,
from imagecodecs/_aec.c:1177:
/tmp/pip-build-env-g4bzjo3a/overlay/lib/python3.11/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
17 | #warning "Using deprecated NumPy API, disable it with " \
| ^~~~~~~
imagecodecs/_aec.c:1184:10: fatal error: libaec.h: No such file or directory
1184 | #include "libaec.h"
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for imagecodecs
ERROR: Could not build wheels for imagecodecs, which is required to install pyproject.toml-based projects
I'm surprised we're running into such an issue when using docker. It's similar to the issue here we had with Macs: https://github.com/fractal-analytics-platform/fractal-tasks-core/issues/289
That issue actually was solved. I can't find our notes on it anymore, but I think it was solved upstream by imagecodecs now supporting ARM macs.
It looks like ARM Linux doesn't have that same support. I'm not sure I fully understand why we're hitting such issues with docker (I thought the docker containers were there to avoid such issues).
Maybe there is a way to get docker to run in x86 mode? Or to run a specific container in x86 mode? Would be great to not have to deal with imagecodecs issues ;)
Failed attempts at setting up docker on the command line
I thought it would be easy to get that done, I just brew install docker. But then I ran into an unknown flag: --build error. So I installed docker-compose.
Then I ran into Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
I tried:
brew install docker-machinebrew services start docker-machine
That didn't help though
Questions marks
I don't have a good overview over the docker license. Can we use the Desktop app for our open source project? Not fully sure here. Says it's free for non-commercial open source projects. I think we qualify for that, but not 100% here.
I assume there's a way to just share the built docker container with people, instead of having everyone build that locally, right? It took a while to build, longer than a conda setup usually takes
Where is the docker share on a Mac? Couldn't figure that part out yet (see: testing log by a docker noob)
Hey @aangelone2
Super cool to see the fractal-containers repo! I'm working through the setup and will add some notes on things I had to figure out or errors I ran into. It's from a total docker novice, but that may also be some of the future target audience 😅
Overall, I was super impressed to be able to get Fractal running in this mode and (once all the setup was there), start the whole framework with a simple
make run
, then just go to the web server. I couldn't get it all running, but still super impressive to see!1. Install docker & set it up correctly.
It's obvious, but should be mentioned somewhere if we expect a broader audience to run this as a demo. I was messing about with trying to brew install docker and get it running. Couldn't get that to work though (see notes below), so I fell back on installing the desktop app.
2. Provide the login credentials
Fractal web requires you log in. Apparently, we're using the default credentials here: Username: admin@fractal.xy Password: 1234
We should specify this in the README, otherwise users get stuck on the login page :)
Where I got stuck
Task installation seems to get a bit tricky. At first, I struggle with figuring out which Python version to use (3.9 and 3.10 were not available in the container. But 3.11 was available.
The larger issue is that we're running into a bug while installing imagecodecs:
I'm surprised we're running into such an issue when using docker. It's similar to the issue here we had with Macs: https://github.com/fractal-analytics-platform/fractal-tasks-core/issues/289 That issue actually was solved. I can't find our notes on it anymore, but I think it was solved upstream by imagecodecs now supporting ARM macs. It looks like ARM Linux doesn't have that same support. I'm not sure I fully understand why we're hitting such issues with docker (I thought the docker containers were there to avoid such issues).
Maybe there is a way to get docker to run in x86 mode? Or to run a specific container in x86 mode? Would be great to not have to deal with imagecodecs issues ;)
Failed attempts at setting up docker on the command line
I thought it would be easy to get that done, I just
brew install docker
. But then I ran into anunknown flag: --build
error. So I installed docker-compose.Then I ran into
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
I tried:
brew install docker-machine
brew services start docker-machine
That didn't help though
Questions marks
I don't have a good overview over the docker license. Can we use the Desktop app for our open source project? Not fully sure here. Says it's free for non-commercial open source projects. I think we qualify for that, but not 100% here.
I assume there's a way to just share the built docker container with people, instead of having everyone build that locally, right? It took a while to build, longer than a conda setup usually takes
Where is the docker share on a Mac? Couldn't figure that part out yet (see: testing log by a docker noob)