Closed
Description
- First, add these lines to your Dockerfile to install Miniconda/Anaconda:
RUN curl -sfLO https://repo.anaconda.com/miniconda/Miniconda3-py39_4.9.2-Linux-x86_64.sh \
&& /bin/bash Miniconda3-py39_4.9.2-Linux-x86_64.sh -b -p /root/miniconda \
&& PATH="/root/miniconda/bin:$PATH" \
&& conda install -c anaconda jupyter
- Then, install the Python Extension and make sure it comes with the Jupyter Extension or you can add this line to your Dockerfile:
RUN code-server --install-extension ms-python.python
RUN code-server --install-extension ms-toolsai.jupyter
- Next, in Code-Server create a file with the extension .ipynb like main.ipynb and set your Python Interpreter as the location of miniconda (~/miniconda/bin/python).
- Finally, you can add your python code to the file and it should work perfectly.
If this doesn't work use the Dockerfile from #3199 (comment)