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!
Hi,
I made a Python 3.8 code environment in dataiku that mimics the code environement I sue to run my streamlit app on my PC. However, the Streamlit app on dataiku seems to use a hard-coded code environment. Is there any way to configure this by the project owner?
thx
Operating system used: Windows 10
Hi @info-rchitect ,
You can't configure a code env for the Streamlit Code Studio.
You can, however add an additional package to the Streamlit block in the Code Studio template.
Hope that helps!
@AlexT thx for the reply. Unfortunately fixing us to Python 3.7 is a non-starter as we need at least 3.81 to take full advantage of our Snowflake Python ecosystem. Can the default Python version for the Streamlit code studio be changed by our system admin?
Currently, there is no supported way to change Python3.7 for streamlit block, but we are actively working on making this available in a upcomming release.
Hello @info-rchitect @AlexT,
Can't we solve this problem by appending the following lines in the Dockerfile of the Code Studio templates? We can delete the default version of python which is 3.7 and reinstall python3.10 for example here.
USER root
WORKDIR /opt/dataiku
# Custom streamlit env with python 3.10
RUN rm -rf /opt/dataiku/python-code-envs/pyenv-streamlit
RUN python3.10 -m venv /opt/dataiku/python-code-envs/pyenv-streamlit
RUN source /opt/dataiku/python-code-envs/pyenv-streamlit/bin/activate && pip install streamlit numpy==1.23.5 pandas
USER dataiku
WORKDIR /home/dataiku
Hi,
You could try, but this would void support, and we wouldn't be able to provide any support around Streamlit.
We plan on releasing a more robust way to include a custom code env for streamlit in upcoming releases.
If you check INSTALL_DIR/resources/plugins/code-studio-blocks/python-code-studio-blocks/streamlit/codeStudioBlock.py this is hardcoded to Python37 right now.
Thanks