Check out Building a Data-Centric Culture at the ALMA Observatory on November 5th Read More

Are there different ways to set up code environments?

Level 2
Are there different ways to set up code environments?
I am trying to install pytorch in python3 in a code environment in data science studio. I can install it in the python3.5 install on the system that Data Science Studio is installed on. I've tried putting torch in the REQUESTED PACKAGES (PIP) part of the code environment administration but that doesn't work because pytorch can't be installed directly through pip. Pytorch requires you to download a pip wheel for installing it (instructions are here: http://pytorch.org/).

I've noticed there is a TODO section coming in the documentation (https://doc.dataiku.com/dss/latest/code-envs/operations-python.html) which probably gives more details about this. I will also be curious how to install a custom project (from git) in a way that it can be used in a custom code environment. FYI I have been able to install both pytorch and the custom project I am alluding to for use with the system install of python3.5 on the server I have DSS installed on.

I'm not sure if my description of the problem is clear so please ask questions if there are any ambiguities. Thanks!
0 Kudos
3 Replies
Dataiker
Dataiker
Hi,

The syntax in the "requested packages" is actually a pip requirements file, so you can simply put the URL of your wheel here

So in essence, you just need the following in your "requested packages"

http://download.pytorch.org/whl/cu80/torch-0.2.0.post3-cp35-cp35m-manylinux1_x86_64.whl
torchvision
Level 2
Author
Awesome, thanks! I'm also curious about how to install a package that isn't done through pip. In the docs you have:

TODO: Explain that admin first downloads them and then how to put that in requirements.txt

I'm trying to install this if it helps: https://github.com/huggingface/torchMoji. The install command I use is:

pip3 install -e .
0 Kudos
Dataiker
Dataiker
Clone the repository on the DSS machine as you would normally do, then add the following line to the "Requested packages":

-e /absolute/path/to/where/you/cloned/torchMoji
0 Kudos