Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

iCSharp with mono support using Docker #23

Closed
awb99 opened this issue Mar 6, 2016 · 9 comments
Closed

iCSharp with mono support using Docker #23

awb99 opened this issue Mar 6, 2016 · 9 comments

Comments

@awb99
Copy link

awb99 commented Mar 6, 2016

I think icsharp shoud ideally run on a linux server and have a simple docker container that allows to play around quickly.

I want to share my progress; I havent had complete success yet.

This project has a dockerimage that installs on debian jessie the current jupyter version (via anaconda) the current mono version (via debian contrib):
https://github.com/awb99/anaconda-notebook

To compile icsharp I had to do a couple of things:

  1. The dependency csscript does not compile in the old verson, so I have to upgrade to the current master:
    git clone --recursive https://github.com/awb99/icsharp.git
    cd icsharp/Engine
    git checkout master
    update git pull
  2. With the latest version there are ambiguous namespace references. My fork has corrected
    some of the issues (not all)

Regards
Andreas

@den-run-ai
Copy link
Contributor

Note that Microsoft release csi Roslyn based repl for VS 2015 which has
better support for c# language, particularly dynamic. Vb.net support is
coming soon.

So icsharp would benefit from this new backend.

Also have a look at binder project for deploying jupyter docker images in
the cloud for free.

On Sunday, March 6, 2016, awb99 notifications@github.com wrote:

I think icsharp shoud ideally run on a linux server and have a simple
docker container that allows to play around quickly.

I want to share my progress; I havent had complete success yet.

This project has a dockerimage that installs on debian jessie the current
jupyter version (via anaconda) the current mono version (via debian
contrib):
https://github.com/awb99/anaconda-notebook

To compile icsharp I had to do a couple of things:

  1. The dependency csscript does not compile in the old verson, so I have
    to upgrade to the current master:
    git clone --recursive https://github.com/awb99/icsharp.git
    cd icsharp/Engine
    git checkout master
    update git pull
  2. With the latest version there are ambiguous namespace references.
    My fork has corrected some of the issues (not all)

Regards
Andreas


Reply to this email directly or view it on GitHub
#23.

@awb99
Copy link
Author

awb99 commented Mar 6, 2016

I am fine with whatever works...ScriptCs is not perfect.. But I would say has a fairly active
commuity.. and works..

Facts are that under current mono the old scriptcs does no longer compile.

My fork now compiles the latest version of scriptcs with no errors;however I thinkI messed up the conversion to PowerArgs and the IScriptLibraryComposer.

My docker image correctly installs Jupyter and Mono, and builds icssharp, and installs the kernel.

I think such a docker kernel would greatly help anyone who runs C# in jupyter. Because just
installing/compiling from scratch takes DAYS.

In Summer I have played around a little, inrunning icssharp; and so far it was runnign for 6 months fine; but now I had to setup again from scratch.. and found that with current mono it doesnotwork again...

Andreas.

@awb99
Copy link
Author

awb99 commented Mar 14, 2016

I have created a test project to see if roslyn engine in scriptcs works.
In windows it does,in mono it does not..
i think it is just a simple directory path issue that is causing the issue...

It is really frustrating how difficult this things are in mono... Simple bugs made e loose lots of time..

@zabirauf zabirauf changed the title mono support iCSharp with mono support using Docker Mar 15, 2016
@awb99
Copy link
Author

awb99 commented Mar 15, 2016

https://github.com/awb99/jupyter-icsharp-docker

Docker image. it is building evertyhing from scratch.
I made all patches so it would work with most recent csscript version.

Only error is when executing the script an issue related to the missing signing of messages.
I had solved this before; but the old trick seems to have changed.

@awb99
Copy link
Author

awb99 commented Mar 15, 2016

@minrk this jupyter c# docker image that made should really help people use the c# icsharp kernel in jupyter. What works: Fully automatic install and config of 1. python & jupyter, 2. mono , 3. compilation of icsharp, 4. install of icsharp kernel. What remains is a messaging bug between jupyter and icsharp (but this bug was sorted out in the past in this forum, so I am hopeful that it can be sorted out by someone here).

@zabirauf
Copy link
Owner

@awb99 Thanks a lot for creating the docker image. I am taking a look into the docker repo you created to understand it better. I will get back to you on it.

@denfromufa Regarding the discussion of roslyn vs mono, the good thing about using scriptcs is that it handles both of those script engines internally. So all we have to do to support the other engine is to initialize the correct Repl and it should hopefully work.

P.S: @awb99 Can you also describe what was the problem "With the latest version there are ambiguous namespace references."?

@den-run-ai
Copy link
Contributor

@zabirauf scriptcs is using old version (at least latest release of scriptcs) of Roslyn which does not support dynamic, and Mono engine has other issues:

http://stackoverflow.com/questions/32471727/for-scriptcs-dynamic-is-not-supported-by-roslyn-and-available-only-with-mono

I use dynamic extensively to call into CPython using pythonnet from .NET:

https://github.com/pythonnet/pythonnet

So until scriptcs releases next version that works with dynamic - I have to resort to CSI REPL provided in VS 2015 Update 1. The problem with CSI REPL is that it only works for 32-bit DLLs:

dotnet/roslyn#8853

So I'm stuck with 32-bit Python and .NET for using C# REPL.

I understand that a lot of users of icsharp work in *nix, hence my pains are not much relevant.

@csells
Copy link

csells commented Mar 27, 2016

I took a whack at using the current instructions at https://github.com/awb99/jupyter-icsharp-docker, but had no luck. After the docker run, I do a "open http://$(docker-machine ip default):8888" (from my Mac) and just get a ERR_CONNECTION_REFUSED. I'm able to get https://github.com/jupyter/docker-stacks to work, so the docker environment on my machine is working.

@awb99
Copy link
Author

awb99 commented Mar 28, 2016

@csells My mistake. I forgot to add the CMD to start jupyter when you run the docker image. I will add that in the next couple of days.

@awb99 awb99 closed this as completed Sep 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants