Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
I have created a code studio template that allows me to run Voila within my DSS instance, but I am having issues attaching a code environment to the template.
I have tried adding the code environment block to the template but have had no success. The only way I have been able to get the Python packages into the template is by installing them via the append to dockerfile block, but this is not ideal for my use case.
Any ideas on how I can include a code environment in the code studio template?
The solution that worked for this was to first add my code environment block to my template and then active this code environment in my entrypoint file like:
# Activate code environment
source /opt/dataiku/python-code-envs/webapp_env/bin/activate
# Run the webapp
/opt/dataiku/python-code-envs/webapp_env/bin/python -m voila --Voila.ip="$BIND_ADDR" --no-browser --Voila.tornado_settings="{'allow_origin': '*'}" --Voila.base_url="$BASE_URL/" --port=8866 /home/dataiku/workspace/code_studio-versioned/Untitled.ipynb
These steps replaced the need for the "Append to Dockerfile" block. Note of caution: make sure you carefully select the Python and package versions, conflicts will cause the code studio to fail!
Hi @samanthamarkley,
Hi @JordanB, say that I want to change my Python version from Python 3.6 to 3.7.10, how would I do that? I know that by default, it is installing Python 3.6. How do I let Dataikh know to install Python 3.7.10 instead?
HI @williamwirono,
If you have the python3.7 installed on your dss host machine and it is available in the env path variable. If you try to create a code env in DSS with python3.7 and you receive an error such as:
RuntimeError: failed to find interpreter for Builtin discover of python_spec='python3.7"
Thanks,
Jordan
The solution that worked for this was to first add my code environment block to my template and then active this code environment in my entrypoint file like:
# Activate code environment
source /opt/dataiku/python-code-envs/webapp_env/bin/activate
# Run the webapp
/opt/dataiku/python-code-envs/webapp_env/bin/python -m voila --Voila.ip="$BIND_ADDR" --no-browser --Voila.tornado_settings="{'allow_origin': '*'}" --Voila.base_url="$BASE_URL/" --port=8866 /home/dataiku/workspace/code_studio-versioned/Untitled.ipynb
These steps replaced the need for the "Append to Dockerfile" block. Note of caution: make sure you carefully select the Python and package versions, conflicts will cause the code studio to fail!