Comments (6)
Maybe we can improve jgo to use the artifacts in .m2 instead of copying them to .jgo
I do not think that that is necessary: by default, artifacts are not copied but rather hard-linked, sym-links can be used if preferred (e.g. if maven cache and jgo cache are on different file systems). Or maybe I do not understand what you would like to improve here?
Also, this may be relevant:
twosigma/beakerx#6340
from tutorials.
I tried to achieve this by adding:
mvn dependency:get -DremoteRepositories=imagej.public::default::https://maven.imagej.net/content/groups/public -Dartifact=net.imagej:imagej:2.0.0-rc-71
mvn dependency:get -DremoteRepositories=imagej.public::default::https://maven.imagej.net/content/groups/public -Dartifact=sc.fiji:fiji:2.0.0-pre-10
(see master...imagejan:pre-install-dependencies)
While this populates .m2/
with dependencies as expected, it's not sufficient for the notebooks to initialize ImageJ/Fiji without downloading lots of further artifacts. My observations so far (running without the above commands to test where artifacts are stored by running the notebooks):
-
Running from a Python kernel:
import imagej ij = imagej.init('sc.fiji:fiji:2.0.0-pre-10')
- This will also put artifacts into
.jgo/sc/fiji/fiji/2.0.0-pre-10+net.imglib-imglib2-imglyb-0.3.0/
, so we'll have to copy them there (or use jgo to set them up?) - This also results in many more different versions of artifacts in
.m2/
(e.g. the above commands inpostBuild
only getimagej-ops-0.43.2
, while running the notebook cell results in versions0.36.0
,0.39.0
,0.41.0
,0.41.1
,0.43.1
,0.43.2
all being present.
- This will also put artifacts into
-
Running from a BeakerX kernel:
%classpath config resolver imagej.public https://maven.imagej.net/content/groups/public %classpath add mvn net.imagej imagej 2.0.0-rc-71 ij = new net.imagej.ImageJ()
- This does not create
.m2
or.jgo
subfolders. In fact, I wasn't able to locate where the dependency jars are stored.
- This does not create
Maybe we can improve jgo
to use the artifacts in .m2
instead of copying them to .jgo
?
/cc @ctrueden, @hanslovsky, @hadim
from tutorials.
I don't have a strong feeling about this feature but I have a comment: the postBuild
step of Conda is pretty hard to debug when something goes wrong and it is also supposed to be a fast step. Moreover, if something is wrong during that step it can mess up your Conda installation a nightmare for a beginner who does not fully understand how Conda works).
So if you want to download artifacts at that step you should really come with bullet-proof scripts that silently exit with a 0 code if something goes wrong.
By the way, I like the jupyter nbconvert --execute --stdout ImageJ_Primer.ipynb
idea.
from tutorials.
Arf sorry guys I mixed up the postBuild
script of binder with the activate.sh
script of Anaconda....
from tutorials.
Thanks a lot for working on this!
As @hanslovsky said, jgo uses links from .m2/repository
, so as long as the needed artifact versions are already present in the local Maven repo cache, the Python notebook's ij = imagej.init(...)
calls should not download anything else, and the linking should be snappy. The version numbers line up, right?
As for BeakerX, one way forward might be to add something like this to the postBuild
:
jupyter nbconvert --execute --stdout ImageJ_Primer.ipynb
Where ImageJ_Primer.ipynb
is a one-cell notebook with the needed %classpath
magic to download stuff.
from tutorials.
I tried running nbconvert
but was running into issues. Will investigate more as time permits.
For the python kernel and pyimagej
, I run imagej.init()
from python in postBuild
, which worked, but the first notebook cell still takes about a minute or so to run. I'll follow up with some benchmarks.
from tutorials.
Related Issues (20)
- Fix ExecuteCommands to work with fake format changes HOT 7
- some error massage
- Invalid service: net.imagej.legacy.LegacyService HOT 1
- Python kernel error (in Binder): PYJNIUS_JAR environment variable not defined. HOT 10
- Link to more awesome data science tutorials HOT 1
- Create tutorial about imglib2-roi and how to work with labelings HOT 2
- Useful Writing Plugin Setup Video HOT 2
- DynamicCommand: combobox in the example never gets updated HOT 2
- Problems with %classpath HOT 3
- Consider using Jupytext for version control of Jupyter notebooks HOT 1
- A connection to the notebook server could not be established.
- "ImageJ with Python Kernel" section 6.2 doesn't work HOT 2
- HowTo wishlist HOT 15
- Move working-with-modules to howtos
- Address dependency skew in BeakerX notebooks
- Resolve BeakerX component version skew (kotlin, okio, maybe more)
- Tab completion isn't working in the Jupyter Notebooks
- Add -Djava.net.useSystemProxies=true tip to sections about proxy configuration
- Update to the latest version of ImageJ2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tutorials.