{"id":2112,"date":"2020-10-13T18:55:17","date_gmt":"2020-10-13T16:55:17","guid":{"rendered":"https:\/\/www.pschatzmann.ch\/home\/?p=2112"},"modified":"2020-11-21T22:22:42","modified_gmt":"2020-11-21T21:22:42","slug":"jupyterlab-and-c","status":"publish","type":"post","link":"https:\/\/www.pschatzmann.ch\/home\/2020\/10\/13\/jupyterlab-and-c\/","title":{"rendered":"Jupyterlab and C++"},"content":{"rendered":"<p>Today I tried to create a Dockerfile for <a href=\"https:\/\/github.com\/jupyter-xeus\/xeus-cling\">XEUS-Cling<\/a> in <a href=\"https:\/\/jupyterlab.readthedocs.io\/en\/stable\/\">Jupyterlab<\/a>. The challenge was, that the installation is done with <a href=\"https:\/\/docs.conda.io\/en\/latest\/\">conda<\/a> which is a little bit tricky to use together with Docker. After some unsuccessful trials, I finally came up with the following working solution:<\/p>\n<pre><code>FROM continuumio\/miniconda3:4.8.2-alpine\nMAINTAINER phil schatzmann\nUSER root\nRUN apk add --no-cache bash\nSHELL [\"\/bin\/bash\",\"--login\",\"-c\"]\nENV PATH \/opt\/conda\/envs\/cling\/bin:\/opt\/conda\/bin:\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin\nRUN conda create -y -n cling xeus-cling xeus-python jupyterlab -c conda-forge\nWORKDIR \/home\/xeus-cling\nEXPOSE 8888\nCMD [\"jupyter\", \"lab\", \"--port=8888\", \"--no-browser\", \"--allow-root\", \"--ip=0.0.0.0\" ]\n<\/code><\/pre>\n<p>I am using it together with docker-compose. The docker-compose.yml looks as follows:<\/p>\n<pre><code><br \/>version: '3.2'\nservices:\n  cling:\n    image: pschatzmann\/xeus-cling\n    container_name: cling\n    restart: always\n    ports:\n      - 8888:8888\n    volumes:\n      - \/srv\/data-science:\/home\/xeus-cling\n      - \/data:\/data\n    environment:\n      - TZ=Europe\/Zurich\n    dns:\n      - 8.8.8.8 \n\n<\/code><\/pre>\n<p>Finally I double check if it is working properly:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2020\/10\/Screenshot-2020-10-13-at-21.32.28-300x218.png\" alt=\"\" width=\"883\" height=\"642\" class=\"alignnone wp-image-2129\" srcset=\"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2020\/10\/Screenshot-2020-10-13-at-21.32.28-300x218.png 300w, https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2020\/10\/Screenshot-2020-10-13-at-21.32.28-768x559.png 768w, https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2020\/10\/Screenshot-2020-10-13-at-21.32.28.png 876w\" sizes=\"auto, (max-width: 883px) 100vw, 883px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I tried to create a Dockerfile for XEUS-Cling in Jupyterlab. The challenge was, that the installation is done with conda which is a little bit tricky to use together with Docker. After some unsuccessful trials, I finally came up with the following working solution: FROM continuumio\/miniconda3:4.8.2-alpine MAINTAINER phil schatzmann [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2113,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[4,5],"tags":[],"class_list":["post-2112","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-science","category-infrastructure"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Jupyterlab and C++ - Phil Schatzmann<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pschatzmann.ch\/home\/2020\/10\/13\/jupyterlab-and-c\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Jupyterlab and C++ - Phil Schatzmann\" \/>\n<meta property=\"og:description\" content=\"Today I tried to create a Dockerfile for XEUS-Cling in Jupyterlab. The challenge was, that the installation is done with conda which is a little bit tricky to use together with Docker. After some unsuccessful trials, I finally came up with the following working solution: FROM continuumio\/miniconda3:4.8.2-alpine MAINTAINER phil schatzmann [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pschatzmann.ch\/home\/2020\/10\/13\/jupyterlab-and-c\/\" \/>\n<meta property=\"og:site_name\" content=\"Phil Schatzmann\" \/>\n<meta property=\"article:published_time\" content=\"2020-10-13T16:55:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-11-21T21:22:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2020\/10\/xeus.png\" \/>\n\t<meta property=\"og:image:width\" content=\"314\" \/>\n\t<meta property=\"og:image:height\" content=\"160\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"pschatzmann\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"pschatzmann\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/10\\\/13\\\/jupyterlab-and-c\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/10\\\/13\\\/jupyterlab-and-c\\\/\"},\"author\":{\"name\":\"pschatzmann\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"headline\":\"Jupyterlab and C++\",\"datePublished\":\"2020-10-13T16:55:17+00:00\",\"dateModified\":\"2020-11-21T21:22:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/10\\\/13\\\/jupyterlab-and-c\\\/\"},\"wordCount\":70,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/10\\\/13\\\/jupyterlab-and-c\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2020\\\/10\\\/xeus.png\",\"articleSection\":[\"Data Science\",\"Infrastructure\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/10\\\/13\\\/jupyterlab-and-c\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/10\\\/13\\\/jupyterlab-and-c\\\/\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/10\\\/13\\\/jupyterlab-and-c\\\/\",\"name\":\"Jupyterlab and C++ - Phil Schatzmann\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/10\\\/13\\\/jupyterlab-and-c\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/10\\\/13\\\/jupyterlab-and-c\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2020\\\/10\\\/xeus.png\",\"datePublished\":\"2020-10-13T16:55:17+00:00\",\"dateModified\":\"2020-11-21T21:22:42+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/10\\\/13\\\/jupyterlab-and-c\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/10\\\/13\\\/jupyterlab-and-c\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/10\\\/13\\\/jupyterlab-and-c\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2020\\\/10\\\/xeus.png\",\"contentUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2020\\\/10\\\/xeus.png\",\"width\":314,\"height\":160},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2020\\\/10\\\/13\\\/jupyterlab-and-c\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Jupyterlab and C++\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#website\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/\",\"name\":\"Phil Schatzmann Consulting\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\",\"name\":\"pschatzmann\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"contentUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"width\":305,\"height\":305,\"caption\":\"pschatzmann\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Jupyterlab and C++ - Phil Schatzmann","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pschatzmann.ch\/home\/2020\/10\/13\/jupyterlab-and-c\/","og_locale":"en_US","og_type":"article","og_title":"Jupyterlab and C++ - Phil Schatzmann","og_description":"Today I tried to create a Dockerfile for XEUS-Cling in Jupyterlab. The challenge was, that the installation is done with conda which is a little bit tricky to use together with Docker. After some unsuccessful trials, I finally came up with the following working solution: FROM continuumio\/miniconda3:4.8.2-alpine MAINTAINER phil schatzmann [&hellip;]","og_url":"https:\/\/www.pschatzmann.ch\/home\/2020\/10\/13\/jupyterlab-and-c\/","og_site_name":"Phil Schatzmann","article_published_time":"2020-10-13T16:55:17+00:00","article_modified_time":"2020-11-21T21:22:42+00:00","og_image":[{"width":314,"height":160,"url":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2020\/10\/xeus.png","type":"image\/png"}],"author":"pschatzmann","twitter_card":"summary_large_image","twitter_misc":{"Written by":"pschatzmann","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pschatzmann.ch\/home\/2020\/10\/13\/jupyterlab-and-c\/#article","isPartOf":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2020\/10\/13\/jupyterlab-and-c\/"},"author":{"name":"pschatzmann","@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"headline":"Jupyterlab and C++","datePublished":"2020-10-13T16:55:17+00:00","dateModified":"2020-11-21T21:22:42+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2020\/10\/13\/jupyterlab-and-c\/"},"wordCount":70,"commentCount":0,"publisher":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"image":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2020\/10\/13\/jupyterlab-and-c\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2020\/10\/xeus.png","articleSection":["Data Science","Infrastructure"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pschatzmann.ch\/home\/2020\/10\/13\/jupyterlab-and-c\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pschatzmann.ch\/home\/2020\/10\/13\/jupyterlab-and-c\/","url":"https:\/\/www.pschatzmann.ch\/home\/2020\/10\/13\/jupyterlab-and-c\/","name":"Jupyterlab and C++ - Phil Schatzmann","isPartOf":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2020\/10\/13\/jupyterlab-and-c\/#primaryimage"},"image":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2020\/10\/13\/jupyterlab-and-c\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2020\/10\/xeus.png","datePublished":"2020-10-13T16:55:17+00:00","dateModified":"2020-11-21T21:22:42+00:00","breadcrumb":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2020\/10\/13\/jupyterlab-and-c\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pschatzmann.ch\/home\/2020\/10\/13\/jupyterlab-and-c\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pschatzmann.ch\/home\/2020\/10\/13\/jupyterlab-and-c\/#primaryimage","url":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2020\/10\/xeus.png","contentUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2020\/10\/xeus.png","width":314,"height":160},{"@type":"BreadcrumbList","@id":"https:\/\/www.pschatzmann.ch\/home\/2020\/10\/13\/jupyterlab-and-c\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pschatzmann.ch\/home\/"},{"@type":"ListItem","position":2,"name":"Jupyterlab and C++"}]},{"@type":"WebSite","@id":"https:\/\/www.pschatzmann.ch\/home\/#website","url":"https:\/\/www.pschatzmann.ch\/home\/","name":"Phil Schatzmann Consulting","description":"","publisher":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pschatzmann.ch\/home\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1","name":"pschatzmann","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","url":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","contentUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","width":305,"height":305,"caption":"pschatzmann"},"logo":{"@id":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png"}}]}},"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/2112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/comments?post=2112"}],"version-history":[{"count":18,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/2112\/revisions"}],"predecessor-version":[{"id":2134,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/2112\/revisions\/2134"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/media\/2113"}],"wp:attachment":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/media?parent=2112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/categories?post=2112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/tags?post=2112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}