zoukankan      html  css  js  c++  java
  • week08 S8-01 docker images tensorflow-jupyter

    rt

    官网http://jupyter.org/

    安装

    一种是 npm install的方式 这种需要自己配置 python和那个tansflow很麻烦

    推荐使用docker方式

    登录

    docker login
    docker pull qianmao/cs503_tensorflow_jupyter
    从docker hub下载images

    我们下载配置好的

     运行这个image 从内部的8888端口到外部的8888端口

    docker run -it --rm -p 8888:8888 qianmao/cs503_tensorflow_jupyter

     

    那么

    如果你在本地运行那么以上已经完成

    或许你以后还要用 所以你要将他上传到你的dockerhub里 那么你需要将本地的images改成你的yourname/cs503_tensorflow_jupyter

    如果你要自己配置自己的docker images通过Dockerfile的方式

    FROM jupyter/scipy-notebook
    MAINTAINER Jupyter Project <jupyter@googlegroups.com>
    #Insatall Python 2 Tensorflow
    RUN conda install --quiet --yes -n python2 'tensorflow=1.0.1'
    Dockerfile

    那么

    sudo docker build . -t your_name/cs503_transorflow_juyter

    sudo docker login

    sudo docker push your_name/cs503_transorflow_juyter

    我们下面来做

    在本地创建自己的image

    sudo docker build . -t hanshanyang/cs503_tensorflow_jupyter

    乳沟中途出现问题 在执行一次就好 

    结果出现问题 说缺乏运行环境  那么就配置环境被 谷歌

    https://www.andrey-melentyev.com/python-environments-and-where-to-find-them.html#docker

    根据这个帖子

    添加一下Dockerfile

    FROM nvidia/cuda:9.0-cudnn7-devel
    FROM jupyter/scipy-notebook
    USER root
    MAINTAINER Jupyter Project <jupyter@googlegroups.com>
    #Insatall Python 2 Tensorflow
    # Setup build environment
    RUN apt-get update --fix-missing && 
        apt-get install -y build-essential cmake wget ca-certificates git
    
    # Install Miniconda
    RUN echo 'export PATH=/opt/conda/bin:$PATH' > /etc/profile.d/conda.sh && 
        wget --quiet https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && 
        /bin/bash ~/miniconda.sh -b -p /opt/conda && 
        rm ~/miniconda.sh
    
    ENV PATH /opt/conda/bin:$PATH
    
    # Install Python packages
    RUN conda install -y tensorflow-gpu keras-gpu ipython
    
    # A nicer Python REPL
    ENTRYPOINT ["ipython"]
    
    RUN conda install --quiet --yes -n python2 'tensorflow=1.0.1'

    下载各种包和依赖

    sudo docker login

    sudo docker push hanshanyang/cs503_tensorflow_jupyter
  • 相关阅读:
    Balder 3D开发系列之创建基本动画
    Expression Blend 的点滴(1)ListBox华丽大变身
    Balder 3D开发系列之创建天空盒
    Balder 3D开发系列之创建自己的primitives
    silverlight 中的应用程序库缓存
    Balder 3D开发系列之——sprite结合Camera旋转木马特效
    VisualTreeHelper不仅仅只是用来查看可视化树结构的
    Balder 3D开发系列之与Sprite初次相遇
    Balder 3D开发系列之给自定义基本体进行贴图操作
    【图解】通过Expression Blend快速制作具有物理效果的动画游戏
  • 原文地址:https://www.cnblogs.com/PoeticalJustice/p/9646316.html
Copyright © 2011-2022 走看看