Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question: installing additional conda packages after build #3

Open
billpage opened this issue Feb 16, 2018 · 1 comment
Open

question: installing additional conda packages after build #3

billpage opened this issue Feb 16, 2018 · 1 comment
Labels

Comments

@billpage
Copy link

What is the correct method to install additional conda packages, e.g. sympy, after build is complete and CuCalc is running? If I use conda install sympy in docker exec -it cucalc bash then sympy is not available to projects in CuCalc due to issues with file privileges.

@ktaletsk
Copy link
Owner

The workaround is to create a new local environment in conda for packages you need.
For example, call /opt/conda/bin/conda create -n sympy python=3.6 ipykernel sympy from terminal in your project to create Python 3.6 environment with sympy installed. Adding ipykernel will allow to use it from Jupyter:

Verify that environment is created: /opt/conda/bin/conda env list

# conda environments:
#
base                  *  /opt/conda
sympy                    /projects/60381e06-c4b4-4b8b-ae7d-a6dc03b1b13a/.conda/envs/sympy

Add new kernel to Jupyter:

export PATH=/opt/conda/bin${PATH:+:${PATH}} 
source activate sympy
(sympy) ~$ python -m ipykernel install --user --name sympy --display-name "Python 3.6 (SymPy)"

Check Jupyter (don't forget to switch kernel)

sympy

If you want to have more permanent solution and be able to use it in all of your project, add the following line to a Dockerfile and rebuild the CuCalc image:

RUN /opt/conda/bin/conda create -n sympy python=3.6 sympy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants