Discussion:
[conda] shebang #! statement of the conda script is "hardcoded" in envs/my_env/bin/jupyter
Fabien Tarrade
2018-10-06 07:02:13 UTC
Permalink
Hello everybody,

because I don't have Internet access from a Linux server and not I am
not authorized to use Docker image on this Linux server, I am using the
following steps:
- create a Docker image to mimic the characteristic of my server
- create a conda env with all the ML and DL packages I need
- zip the sub folder that contain my enc: /opt/conda/envs/my_env
- coping the env folder on the Linux server under /home/xxx/.conda/envs/
I am using such receipt since more than a year and it is working fine.
If you want to see the detail you can look at my GitHub dir:
(https://github.com/tarrade/proj_docker_images_ML)

The only issue I have is when I want to start Jupyter from the env.
It seems that the shebang |#!| statement of the conda script is
hardcoded (path from the creation of the original env with Docker).

I see the following:

more */home/xxx/.conda/envs/my_env/bin/jupyter*
#!*/opt/conda/*envs/docker_env/bin/python

To have jupyter working from the env I need to do do the following
modification

more */home/xxx/.conda/envs/my_env/bin/jupyter*
#!*/home/xxx/.conda*/envs/env_affinity/bin/python

 Is there some command with conda that will check and fix such path ?
It is easy to do it on my side but is there shebang |#!| statement of
the conda script that need to be fixed as well when copying conda env
from a machine to another machine ?

 (I fixed this issue by looking at the following Stackoverflow thread:
https://stackoverflow.com/questions/39884499/conda-command-will-prompt-error-bad-interpreter-no-such-file-or-directory/39884767)

Thanks a lot
Cheers
Fabien
--
Dr. Fabien Tarrade

Senior Data Scientist at AXA
<https://www.facebook.com/fabien.tarrade.eu>

I am a senior Data Scientist at AXA with the mission of helping AXA
becoming a data driven organisation by using advanced analytics and Big
Data.
I have over 10 years of experience in management of large projects,
processing, modelling and statistical treatment of large volume of
experimental data
up to 10 petabytes as well as the development and maintenance of
advanced and complex computer programs.

Zurich, Switzerland

Email : ***@fabien-tarrade.eu <mailto:***@fabien-tarrade.eu>
Phone : www.fabien-tarrade.eu <http://www.fabien-tarrade.eu>

LinkedIn <http://ch.linkedin.com/in/fabientarrade/> Twitter
<https://twitter.com/fabtar> Google
<https://plus.google.com/+FabienTarradeProfile/posts> Facebook
<https://www.facebook.com/fabien.tarrade.eu> Google
<skype:fabtarhiggs?call> Xing <https://www.xing.com/profile/Fabien_Tarrade>
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/bcb7859f-7425-36a2-2f89-f41fb5afebb8%40gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
Thomas Holder
2018-10-06 20:21:33 UTC
Permalink
I have a script that patches shebangs to be portable. Works well for me. See:
https://github.com/conda/conda/issues/3097#issuecomment-334671015

Thomas
If you are relocating a conda setup from one machine to another you need to be careful as it cannot be done trivially as you've found out.
You should look into either constructor or conda-pack instead as these should handle that for you.
Hello everybody,
- create a Docker image to mimic the characteristic of my server
- create a conda env with all the ML and DL packages I need
- zip the sub folder that contain my enc: /opt/conda/envs/my_env
- coping the env folder on the Linux server under /home/xxx/.conda/envs/
I am using such receipt since more than a year and it is working fine. If you want to see the detail you can look at my GitHub dir: (https://github.com/tarrade/proj_docker_images_ML)
The only issue I have is when I want to start Jupyter from the env.
It seems that the shebang #! statement of the conda script is hardcoded (path from the creation of the original env with Docker).
more /home/xxx/.conda/envs/my_env/bin/jupyter
#!/opt/conda/envs/docker_env/bin/python
To have jupyter working from the env I need to do do the following modification
more /home/xxx/.conda/envs/my_env/bin/jupyter
#!/home/xxx/.conda/envs/env_affinity/bin/python
Is there some command with conda that will check and fix such path ? It is easy to do it on my side but is there shebang #! statement of the conda script that need to be fixed as well when copying conda env from a machine to another machine ?
(I fixed this issue by looking at the following Stackoverflow thread: https://stackoverflow.com/questions/39884499/conda-command-will-prompt-error-bad-interpreter-no-such-file-or-directory/39884767)
Thanks a lot
Cheers
Fabien
--
Dr. Fabien Tarrade
Senior Data Scientist at AXA
I am a senior Data Scientist at AXA with the mission of helping AXA becoming a data driven organisation by using advanced analytics and Big Data.
I have over 10 years of experience in management of large projects, processing, modelling and statistical treatment of large volume of experimental data
up to 10 petabytes as well as the development and maintenance of advanced and complex computer programs.
Zurich, Switzerland
: www.fabien-tarrade.eu
--
Thomas Holder
PyMOL Principal Developer
Schrödinger, Inc.
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/D5509864-817B-4B5E-8989-752B34B2E35F%40schrodinger.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
Nehal J Wani
2018-10-07 07:49:55 UTC
Permalink
On could use conda create -yp /home/xxx/.conda/envs/ --clone my_env and
then zip/tar it, and/or explore https://github.com/conda/conda-pack

Cheers!

Nehal J Wani
Post by Thomas Holder
https://github.com/conda/conda/issues/3097#issuecomment-334671015
Thomas
If you are relocating a conda setup from one machine to another you need
to be careful as it cannot be done trivially as you've found out.
You should look into either constructor or conda-pack instead as these
should handle that for you.
Hello everybody,
because I don't have Internet access from a Linux server and not I am
not authorized to use Docker image on this Linux server, I am using the
- create a Docker image to mimic the characteristic of my server
- create a conda env with all the ML and DL packages I need
- zip the sub folder that contain my enc: /opt/conda/envs/my_env
- coping the env folder on the Linux server under /home/xxx/.conda/envs/
I am using such receipt since more than a year and it is working fine.
If you want to see the detail you can look at my GitHub dir: (
https://github.com/tarrade/proj_docker_images_ML)
The only issue I have is when I want to start Jupyter from the env.
It seems that the shebang #! statement of the conda script is hardcoded
(path from the creation of the original env with Docker).
more /home/xxx/.conda/envs/my_env/bin/jupyter
#!/opt/conda/envs/docker_env/bin/python
To have jupyter working from the env I need to do do the following
modification
more /home/xxx/.conda/envs/my_env/bin/jupyter
#!/home/xxx/.conda/envs/env_affinity/bin/python
Is there some command with conda that will check and fix such path ? It
is easy to do it on my side but is there shebang #! statement of the conda
script that need to be fixed as well when copying conda env from a machine
to another machine ?
https://stackoverflow.com/questions/39884499/conda-command-will-prompt-error-bad-interpreter-no-such-file-or-directory/39884767
)
Thanks a lot
Cheers
Fabien
--
Dr. Fabien Tarrade
Senior Data Scientist at AXA
I am a senior Data Scientist at AXA with the mission of helping AXA
becoming a data driven organisation by using advanced analytics and Big
Data.
I have over 10 years of experience in management of large projects,
processing, modelling and statistical treatment of large volume of
experimental data
up to 10 petabytes as well as the development and maintenance of
advanced and complex computer programs.
Zurich, Switzerland
: www.fabien-tarrade.eu
--
Thomas Holder
PyMOL Principal Developer
Schrödinger, Inc.
--
You received this message because you are subscribed to the Google Groups
"conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit
https://groups.google.com/a/continuum.io/d/msgid/conda/D5509864-817B-4B5E-8989-752B34B2E35F%40schrodinger.com
.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/CAG6NSr%3Diuf7Wqov5P9gLBS%3DhYsGXwuAa0KvbqOtqDQMF2H1ayg%40mail.gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
Fabien Tarrade
2018-10-07 13:05:16 UTC
Permalink
Hi Thomas and Ray,

Thanks a lot for these informations. It seems to me that the scripts
should be enough for me. I will  still look at the 2 others options.

Thanks
Cheers
Fabien
Post by Thomas Holder
https://github.com/conda/conda/issues/3097#issuecomment-334671015
Thomas
If you are relocating a conda setup from one machine to another you need to be careful as it cannot be done trivially as you've found out.
You should look into either constructor or conda-pack instead as these should handle that for you.
Hello everybody,
- create a Docker image to mimic the characteristic of my server
- create a conda env with all the ML and DL packages I need
- zip the sub folder that contain my enc: /opt/conda/envs/my_env
- coping the env folder on the Linux server under /home/xxx/.conda/envs/
I am using such receipt since more than a year and it is working fine. If you want to see the detail you can look at my GitHub dir: (https://github.com/tarrade/proj_docker_images_ML)
The only issue I have is when I want to start Jupyter from the env.
It seems that the shebang #! statement of the conda script is hardcoded (path from the creation of the original env with Docker).
more /home/xxx/.conda/envs/my_env/bin/jupyter
#!/opt/conda/envs/docker_env/bin/python
To have jupyter working from the env I need to do do the following modification
more /home/xxx/.conda/envs/my_env/bin/jupyter
#!/home/xxx/.conda/envs/env_affinity/bin/python
Is there some command with conda that will check and fix such path ? It is easy to do it on my side but is there shebang #! statement of the conda script that need to be fixed as well when copying conda env from a machine to another machine ?
(I fixed this issue by looking at the following Stackoverflow thread: https://stackoverflow.com/questions/39884499/conda-command-will-prompt-error-bad-interpreter-no-such-file-or-directory/39884767)
Thanks a lot
Cheers
Fabien
--
Dr. Fabien Tarrade
Senior Data Scientist at AXA
I am a senior Data Scientist at AXA with the mission of helping AXA becoming a data driven organisation by using advanced analytics and Big Data.
I have over 10 years of experience in management of large projects, processing, modelling and statistical treatment of large volume of experimental data
up to 10 petabytes as well as the development and maintenance of advanced and complex computer programs.
Zurich, Switzerland
: www.fabien-tarrade.eu
--
Thomas Holder
PyMOL Principal Developer
Schrödinger, Inc.
--
Dr. Fabien Tarrade

Senior Data Scientist at AXA
<https://www.facebook.com/fabien.tarrade.eu>

I am a senior Data Scientist at AXA with the mission of helping AXA
becoming a data driven organisation by using advanced analytics and Big
Data.
I have over 10 years of experience in management of large projects,
processing, modelling and statistical treatment of large volume of
experimental data
up to 10 petabytes as well as the development and maintenance of
advanced and complex computer programs.

Zurich, Switzerland

Email : ***@fabien-tarrade.eu <mailto:***@fabien-tarrade.eu>
Phone : www.fabien-tarrade.eu <http://www.fabien-tarrade.eu>
Phone : +41 (0)79 524 58 25

LinkedIn <http://ch.linkedin.com/in/fabientarrade/> Twitter
<https://twitter.com/fabtar> Google
<https://plus.google.com/+FabienTarradeProfile/posts> Facebook
<https://www.facebook.com/fabien.tarrade.eu> Google
<skype:fabtarhiggs?call> Xing <https://www.xing.com/profile/Fabien_Tarrade>
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/64a59d1f-080a-35f8-5a6d-46547856e1cc%40gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
Loading...