Open benwilks opened 1 year ago
@benwilks Sorry for the slow reply. Something went sideways trying to download the scifio-labeling library from Maven, and then when PyImageJ (via jgo) tried to include it in the environment, it didn't work because the scifio-labeling-0.3.1.jar
was not in the expected location of ~/.m2/repository
. I wonder if this is because your Maven installation (which looks like it came from conda-forge) downloaded the library elsewhere without jgo understanding that.
With your pyimagej environment active, you can try to run:
$ mvn -X dependency:get -Dartifact=org.scijava:scijava-common:2.94.2 | grep url:
url: file:///home/curtis/.m2/repository/
url: https://repo.maven.apache.org/maven2
We want to see where the local .m2/repository
resides. As you can see, mine is in my home directory, but maybe yours is somewhere else?
But you know, now that I wrote all this out, it actually might be something else going wrong: is it possible that Docker does not like the attempt to hard-link? From your log above, the attempt is:
ln /home/jovyan/.m2/repository/io/scif/scifio-labeling/0.3.1/scifio-labeling-0.3.1.jar' '/home/jovyan/.jgo/io.scif/scifio-labeling/0.3.1/64d37f756ce9b31af4b9413862ddb4fdae7bd1d10bdfadd417d693b8642fc2e3/scifio-labeling-0.3.1.jar`
which only works when the source and destination are on the same physical disk partition. Maybe Docker does not like hard links in general? I'm not sure, but you can try adding the following configuration step to your script:
echo "[settings]" >> ~/.jgorc
echo "links = soft" >> ~/.jgorc
which will change jgo's preferred behavior from hard links (ln
) to soft/symlinks (ln -s
).
Happy to help advise further if you are still stuck. Let me know whether any of the above ideas enable any progress.
One other thing: I just stumbled over #280, which is likely to bite you right now since you are also trying to build a wrapped local Fiji installation. In the meantime, you might want to consider using sc.fiji:fiji:2.14.0
instead as your endpoint, rather than curling down fiji-linux64.zip
, as long as you don't need to customize your installation with additional plugins afterward.
Finally, if you have sufficient Python programming experience, and you are able to figure this out, it would be awesome if you could think about how to improve the imagej.doctor
to catch this situation in future in case other people have the same problem.
Hi, I'm having trouble running pyimagej image.init() installed with conda/mamba in a docker container.
Importing imagej works but when i run:
ij = imagej.init(os.path.join(base_dir, 'Fiji.app'), mode='headless')
I get the following error related to
Running ImageJ doctor doesn't show any problems
import imagej.doctor imagej.doctor.checkup()