Closed sitangshugk95 closed 1 year ago
@sannant It looks like this is related to #63 . Is this something that I can fix/submit a request, or does this need to be done from your end?
You are very welcome to submit a pull request. We will review it anyway. Thank you for finding this error, and sorry that this issue slipped out of my attention.
@sannant could you please give me the access rights to submit pull requests?
I'm trying to push the modified code and it is giving me the following error:
you can create a fork on github and push there. (you will need to set your fork as push remote)
Thanks, I have submitted the pull request.
@jotelha @sannant The change (line 44 - linearize_core) shows up in contact.engineering github after being merged:
However, when I am running a code that calls that function using singularity run docker://imteksim/jupyterlab-surfacetopography:latest
, the change is not being reflected; the error shows the old code (line 44 - LinearCorePotential):
Is there something that needs to be done for the changes to be reflected when executing using Docker images?
Hi @sitangshugk95 the containers won't update by themselves, we will build a new one with some future release soon.
Thanks @jotelha.
Could you give me a rough estimate of when you expect to do it? It would help me plan my work accordingly, as I can't proceed unless it is done.
Also, since it looks like Docker images is the approach I would have to stick to to use contact.engineering for the near future, what would be a realistic frequency (biweekly/monthly/other) to update the containers based on your workload? I don't think it would be needed very frequently anyway once the basic debugging is done, but I would still like to have that info and inform my advisor.
Can't give any estimate here, since ContactEngineering is an academic project, and many of the repositories like Adhesion
grow organically as people collaborate loosely while working on their PhD and master projects, without the resources to provide support. My own project is rather unrelated and I am only helping a little on the side with the container-related stuff.
If you need your own modifications in the container timely, you can bind your local copy of whatever repository you changed into the container instance and override whatever is already present within the container.
Have a look at https://github.com/ContactEngineering/ce-container-stack/tree/master/docker/jupyterlab-SurfaceTopography#changes-to-the-container
Let's say you want a modified Adhesion
package and you have it locally at /path/to/git/repo/Adhesion
. In short, what you could do to have the modified repository in the container, is:
docker run -v /path/to/git/repo/Adhesion:/home/jovyan/Adhesion -p 8888:8888 imteksim/jupyterlab-surfacetopography:latest
conda deactivate
andexport PATH=$(echo "$PATH" | sed -e 's|/opt/conda[^:]*:||g')
to remove any conda
-related residue from the path to break out of the container's default conda environment./home/jovyan/Adhesion
or wherever you mounted your repo within in the containerpip install .
or pip install -e .
, latter for editable in-place. That should override whatever Adhesion
version is already available within the SurfaceTopography
kernel in the container.pip install git+https://github.com/ContactEngineering/Adhesion.git@master
, the suffix pointing to the actual branchHope that helps.
Thank you for the very detailed answer, so sorry again for my unfamiliarity with Linux.
- Launch container instance with bind mount, i.e.
docker run -v /path/to/git/repo/Adhesion:/home/jovyan/Adhesion -p 8888:8888 imteksim/jupyterlab-surfacetopography:latest
@jotelha Quick question - could you please tell me how to modify the above command to use it with singularity without root privileges? eg; I generally use singularity run docker://imteksim/jupyterlab-surfacetopography:latest
to launch the images, and I have it locally in /home/grads/s/sitangshugk95/Adhesion
.
I tried the following, but it was probably wrong:
This question boils down to looking into the singularity documentation, https://docs.sylabs.io/guides/3.0/user-guide/bind_paths_and_mounts.html will tell you to run
singularity run --bind /home/grads/s/sitangshugk95/Adhesion:/home/jovyan/Adhesion docker://imteksim/jupyterlab-surfacetopography:latest
but isn't your home directory mounted anyway with singularity?
@jotelha All I to do run the docker images is type singularity run docker://imteksim/jupyterlab-surfacetopography:latest
in console - I am not entirely sure if my home directory is mounted with singularity: does it matter and how do I check it?
Anyway, I used singularity run --bind /home/grads/s/sitangshugk95/Adhesion:/home/jovyan/Adhesion docker://imteksim/jupyterlab-surfacetopography:latest
and followed the steps you mentioned here and it works perfect - the changes have been reflected. Thanks a lot! Are these changes stored permanently? Or is it only local to that instance of the container, and will go away once I close that and open a new instance?
https://github.com/ContactEngineering/Adhesion/blob/master/examples/adhesive_plastic_simulation_cone.ipynb
I think it should be
from Adhesion.Interactions.cutoffs import LinearCorePotential
instead offrom Adhesion.Interactions import LinearCorePotential
I was getting this error:
but changing it fixed the error:
![image](https://user-images.githubusercontent.com/108830413/204719006-81cca1f0-6b6c-4db3-8e97-20882ca03cee.png)
However, I cannot make changes to the function definitions, and I guess that it is the same issue that is causing this error:![image](https://user-images.githubusercontent.com/108830413/204719209-6ed6dfdd-1dbb-4b74-b4b7-0b8bd4770e23.png)
@sannant Please let me know if this is something that needs to be fixed on your end, or is it something that I am doing wrong?