首页 > 其他分享 >使用Docker容器运行jupyter

使用Docker容器运行jupyter

时间:2024-05-14 09:42:39浏览次数:15  
标签:容器 8888 kernel run jupyter Docker docker

jupyter运行c

cd jupyter-c-kernel
docker run -v $(pwd):/jupyter/jupyter_c_kernel/ -v /home/jovyan/work:/home/jovyan/work -p 8888:8888 brendanrius/jupyter-c-kernel
#注意给/home/jovyan/work权限

Minimal C kernel for Jupyter

  • docker pull brendanrius/jupyter-c-kernel
  • docker run -p 8888:8888 brendanrius/jupyter-c-kernel
  • Copy the given URL containing the token, and browse to it. For instance:
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
   http://localhost:8888/?token=66750c80bd0788f6ba15760aadz53beb9a9fb4cf8ac15ce8

Manual installation

Works only on Linux and OS X. Windows is not supported yet. If you want to use this project on Windows, please use Docker.

  • Make sure you have the following requirements installed:
  • gcc
  • jupyter
  • python 3
  • pip

Step-by-step:

  • pip install jupyter-c-kernel
  • install_c_kernel
  • jupyter-notebook. Enjoy!

Example of notebook

Example of notebook

Custom compilation flags

You can use custom compilation flags like so:

Custom compulation flag

Here, the -lm flag is passed so you can use the math library.

Contributing

The docker image installs the kernel in editable mode, meaning that you can
change the code in real-time in Docker. For that, just run the docker box like
that:

git clone https://github.com/brendan-rius/jupyter-c-kernel.git
cd jupyter-c-kernel
docker run -v $(pwd):/jupyter/jupyter_c_kernel/ -p 8888:8888 brendanrius/jupyter-c-kernel

This clones the source, run the kernel, and binds the current folder (the one
you just cloned) to the corresponding folder in Docker.
Now, if you change the source, it will be reflected in http://localhost:8888
instantly. Do not forget to click "restart" the kernel on the page as it does
not auto-restart.

docker仓库地址:https://hub.docker.com/r/brendanrius/jupyter-c-kernel
参考链接:https://www.cnblogs.com/AubeLiang/p/17569044.html
交互式C下载链接:https://root.cern.ch/download/cling/

标签:容器,8888,kernel,run,jupyter,Docker,docker
From: https://www.cnblogs.com/uutow/p/18188421

相关文章

  • 随笔-aliyun os centos 9 docker-ce install
    aliyunoscentos9docker-ceinstallsudowget-O/etc/yum.repos.d/docker-ce.repohttps://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.reposudoyum-yinstalldocker-ce参考:InstallDockerEngineonCentOS阿里云文档《安装Docker并使用(Linux)》(来自......
  • Flex布局-容器项
    弹性盒子是一种用于按行或按列的一维布局方法.元素可以膨胀以填充额外的空间,也可以收缩以适应更小的空间.flex重点概览对于flex重要的理解点在于:主轴与交叉轴换行与缩写主轴对齐放市场交叉轴对齐方式基于了解完上面的内容,我们能用flex布局实现如下几种......
  • 运维必备Linux学习day2(mysql,jdk,redis,docker安装)
    一.MySQL安装①Linux环境:1.虚拟机Centos7.6版本安装,2.准备类似版本 mysql-5.7.26-1.el7.x86_64.rpm-bundle.tar包1.新建文件夹/opt/mysql,并cd进去,首先:mkdir/opt/mysql2.运行 wgethttp://dev.mysql.com/get/mysql-5.7.26-1.el7.x86_64.rpm-bundle.tar,下载mysql安装包......
  • docker 环境如何复制到另外一台
    如何将Docker环境复制到另外一台机器在使用Docker进行软件开发和部署时,我们经常会面临需要将一个已经配置好的Docker环境复制到另外一台机器上的情况。本文将介绍一种简单的方法来解决这个问题,并提供相应的代码示例。问题背景假设我们在一台机器上已经成功配置好了一个Doc......
  • Docker 部署 Mysql8.1
    #不挂载,直接创建容器[root@VM-24-9-centos~]#dockerrun-d-p3306:3306--namemysql-eMYSQL_ROOT_PASSWORD='123456'mysql获取镜像#拉取镜像[root@VM-24-9-centos~]#dockerpullmysql:8.1创建挂载目录和配置文件#创建挂载目录[root@VM-0-17-centos~]#mkd......
  • Docker执行命令报错:Cannot connect to the Docker daemon at unix:///var/run/docker.
    1、问题说明Docker执行重新启动命令重启成功。命令如下:重新加载配置systemctldaemon-reload重启docker服务systemctlrestartdocker.service查看启动状态systemctlstatusdocker.service显示启动成功使用docker-v命令查看版本号输出正常但是使用dockerps......
  • Docker 必知必会3----使用自己制作的镜像
    前面的两篇文章分别讲了,docker的基础概念,设计思路以及docker的基本操作。感兴趣的同学可以查阅:https://www.cnblogs.com/jilodream/p/18177695https://www.cnblogs.com/jilodream/p/18184687本文我们将介绍如何使用自己的镜像。一、制作自己镜像docker本身已经提供了镜像制作的......
  • Docker下搭建gitlab
    docker安装流程获取gitlab(社区版)--已有镜像时,可跳过此步dockerpullgitlab/gitlab-ce:latest创建本地卷用于保存gitlab数据e:\dockerdata\config\logs\data运行dockerrun--detach--hostnamexxxx.com--publish443:443--publi......
  • 使用 Docker 部署 WebTop 运行 Linux 系统
    1)项目介绍GitHub:https://github.com/linuxserver/docker-webtopWebTop它是一个基于Linux(Ubuntu和Alpine两种版本)的轻量级容器,具有在浏览器中运行的完整桌面环境,具有基本的窗口管理器、像素完美的渲染分辨率、音频支持、剪贴板支持、屏幕键盘支持,以及用于上传/下载的远程......
  • 安装 elasticsearch & kibana (docker )
    1.elasticsearchdockerrun-e"ES_JAVA_OPTS=-Xms256m-Xmx256m"\--nameelasticsearch-p9200:9200-p9300:9300\-e"discovery.type=single-node"\-v/usr/share/elasticsearch/config:/usr/share/elasticsearch/config\-delasticsea......