python3.5-tensorflow-keras 安装
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了python3.5-tensorflow-keras 安装,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含4532字,纯文字阅读大概需要7分钟。
内容图文
cpu
centos
FROM centos:7
MAINTAINER yon
RUN yum -y install make wget && wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo && wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo && yum clean all && yum makecache
RUN yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc
RUN wget -O /usr/local/src/Python-3.5.5.tar.xz https://www.python.org/ftp/python/3.5.5/Python-3.5.5.tar.xz && cd /usr/local/src/ && xz -d Python-3.5.5.tar.xz && tar -xf Python-3.5.5.tar && cd /usr/local/src/Python-3.5.5 && ./configure prefix=/usr/local/python3 && make && make install
RUN mv /usr/bin/python /usr/bin/python.bak && ln -s /usr/local/python3/bin/python3.5 /usr/bin/python && rm -rf /usr/bin/pip* && ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3 && ln -s /usr/bin/pip3 /usr/bin/pip
RUN sed -i 's@/usr/bin/python@/usr/bin/python2@' /usr/bin/yum && sed -i 's@/usr/bin/python@/usr/bin/python2@' /usr/libexec/urlgrabber-ext-down
RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow==1.11.0 && pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple Keras==2.2.4
unbutu
FROM ubuntu:16.04
MAINTAINER yon
ADD Python-3.5.5.tgz /opt
#更新apt
RUN apt-get update && apt-get install -y wget
#安装依赖
RUN apt-get install gcc -y && apt-get install make -y && apt-get install vim -y && apt-get install openssl -y && apt-get install libssl-dev -y && apt-get install python3-pip -y
RUN ./opt/Python-3.5.5/configure --prefix=/usr/local/python3.5 && make && make install
RUN pip3 install -i https://mirrors.aliyun.com/pypi/simple/ tensorflow==1.11.0 \
&& pip3 install -i https://mirrors.aliyun.com/pypi/simple/ Keras==2.2.4
CMD [""]
gpu
http://mirrors.aliyun.com/pypi/packages/84/d8/00a450ad627c7c5e28ada8a179e6a43854089ea5b30485f896efa5ed5814/tensorflow_gpu-1.11.0-cp35-cp35m-manylinux1_x86_64.whl#sha256=e34bcc8404cff35c6fd12b8fcd2a3210a1bfc1cd461469a90a84c2f5e5f9ef11
centos
pip3 install -i https://mirrors.aliyun.com/pypi/simple/ Keras==2.2.4
pip3 install -i https://mirrors.aliyun.com/pypi/simple/ tensorflow-gpu==1.11.0
FROM nvidia/cuda:9.0-cudnn7-devel-centos7
MAINTAINER yon
RUN yum -y install make wget && wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo && wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo && yum clean all && yum makecache
RUN yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc
RUN wget -O /usr/local/src/Python-3.5.5.tar.xz https://www.python.org/ftp/python/3.5.5/Python-3.5.5.tar.xz && cd /usr/local/src/ && xz -d Python-3.5.5.tar.xz && tar -xf Python-3.5.5.tar && cd /usr/local/src/Python-3.5.5 && ./configure prefix=/usr/local/python3 && make && make install
RUN mv /usr/bin/python /usr/bin/python.bak && ln -s /usr/local/python3/bin/python3.5 /usr/bin/python && rm -rf /usr/bin/pip* && ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3 && ln -s /usr/bin/pip3 /usr/bin/pip
RUN sed -i 's@/usr/bin/python@/usr/bin/python2@' /usr/bin/yum && sed -i 's@/usr/bin/python@/usr/bin/python2@' /usr/libexec/urlgrabber-ext-down
RUN pip3 install -i https://mirrors.aliyun.com/pypi/simple/ tensorflow-gpu==1.11.0 && pip3 install -i https://mirrors.aliyun.com/pypi/simple/ Keras==2.2.4
ubuntu
FROM nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04
MAINTAINER yon
#ADD Python-3.5.5.tgz /opt
#更新apt
RUN apt-get update && apt-get install -y wget
RUN wget -O /opt/Python-3.5.5.tar.tgz https://www.python.org/ftp/python/3.5.5/Python-3.5.5.tgz
#安装依赖
RUN apt-get install gcc -y && apt-get install make -y && apt-get install vim -y && apt-get install openssl -y && apt-get install libssl-dev -y && apt-get install python3-pip -y
RUN cd /opt/ && tar xf Python-3.5.5.tar.tgz && /opt/Python-3.5.5/configure --prefix=/usr/local/python3.5 && make && make install
RUN pip3 install -i https://mirrors.aliyun.com/pypi/simple/ tensorflow-gpu==1.11.0 && pip3 install -i https://mirrors.aliyun.com/pypi/simple/ Keras==2.2.4
CMD [""]
原文:https://www.cnblogs.com/g2thend/p/11515582.html
内容总结
以上是互联网集市为您收集整理的python3.5-tensorflow-keras 安装全部内容,希望文章能够帮你解决python3.5-tensorflow-keras 安装所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。