Skip to content

Document how to use Python & Jupyter #4333

Closed
@AyaanZaveri

Description

@AyaanZaveri
  1. 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
  1. 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
  1. 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).
  2. Finally, you can add your python code to the file and it should work perfectly.
    Screen Shot 2021-10-09 at 6 35 56 PM
    Screen Shot 2021-10-09 at 6 36 52 PM

If this doesn't work use the Dockerfile from #3199 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation related

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions