Last active
February 22, 2021 22:32
-
-
Save jschpp/888c96ddf117555508ac5b38c6890c4e to your computer and use it in GitHub Desktop.
.Net + Powershell + Jupyter = ❤️
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster | |
RUN apt-get update && apt-get install python3 python3-pip -y | |
RUN pip3 install jupyterlab | |
RUN dotnet tool install -g --add-source "https://dotnet.myget.org/F/dotnet-try/api/v3/index.json" Microsoft.dotnet-interactive | |
ENV PATH="/root/.dotnet/tools:${PATH}" | |
RUN dotnet interactive jupyter install | |
CMD ["/usr/local/bin/jupyter", "lab", "--allow-root", "--port=8888", "--ip=0.0.0.0", "--notebook-dir=/mnt"] | |
EXPOSE 8888 |
I've tried setting up a windows container Dockerfile...
There are a few problems there:
- The python installer doesn't run -> can be solved by downloading/installing python on your dev machine and then copying it into the container
- If you use the embedded version of python pip doesn't work
- Using anaconda seems to be an open issue ContinuumIO/anaconda-issues#1762
So all in all my recommendation would be to switch to linux containers :-)
Maybe I wasn't clear. The image you have in your Dockerfile tries to build a Nano Server-based image and fails. The base image is wrong. I have built a Linux container and that works.
hmm... Works for me but I fixed it
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you want to run this on a Windows machine you either need to enable linux containers in docker or I need to create a new Dockerfile