Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request to support C language in Datahub #4930

Open
balajialg opened this issue Aug 24, 2023 · 4 comments
Open

Request to support C language in Datahub #4930

balajialg opened this issue Aug 24, 2023 · 4 comments
Assignees

Comments

@balajialg
Copy link
Contributor

balajialg commented Aug 24, 2023

Summary

Got a request from an instructor who is interested in using Python and C programming language in the same course. There are C kernels like Jupyter C Kernel and C Kernel that we could potentially explore. Can we install the C kernels in our image?

Inputs from the instructor below,

I'm designing a course intended for biology majors titled, "Programming for biologists." My goal is to teach basic programming. The course will be language agnostic. That said, I will focus on two languages: C early in the semester and Python later in the semester.

I am interested in having a web-based interface through which the students can write and compile in both languages. I'm aware that we have excellent support for Jupyter Notebook on campus, and I suppose that would be fine, but I'm trying to minimize the angst students experience with compiling or running the code they write, so one unified interface would be best

John Huelsenbeck

@balajialg balajialg self-assigned this Aug 24, 2023
@balajialg balajialg changed the title Request to support C Kernel in Datahub Request to support C language in Datahub Aug 24, 2023
@ryanlovett
Copy link
Collaborator

I'm not well informed about these, but there is also QuantStack's Xeus-based C++ kernel xeus-cling which supports C.
Screenshot 2023-08-24 at 2 15 46 PM

@balajialg
Copy link
Contributor Author

balajialg commented Aug 24, 2023

@ryanlovett Just played with a notebook based on this kernel in binder. Super cool :)

Tried enabling it in Datahub by doing the following steps, it didn't work for me,

  • Launched terminal and the following commands,
  • Ran mamba create -n cling
  • Ran source activate cling
  • Ran mamba install xeus-cling -c conda-forge
  • Launched a new notebook and checked available kernels - didn't work
  • Restarted the kernel in an active notebook - didn't work

C kernel is not listed amongst the available kernels. Launcher also did not show an icon for this new kernel. Is it possible to install this kernel on the user server side or it needs to get added to environment.yml?

@ryanlovett
Copy link
Collaborator

@balajialg Yes, I believe so. In that example you're installing the kernel into a separate conda environment so you'd need to also create a kernel which references that environment. On data100, without creating a separate env first, I just ran micromamba install -c conda-forge xeus-cling. Then under the Launcher there were icons for C++11, C++14, and C++17.
Screenshot 2023-08-24 at 5 53 56 PM

xeus-cling could be added to biology hub's environment.yml file fairly easily.

@balajialg
Copy link
Contributor Author

balajialg commented Aug 25, 2023

Yes, installing via micromamba works perfectly well. Thanks @ryanlovett!

Yes - we should totally add that to the environment.yml file once the faculty expresses interest in going down this route!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants