2 Star 6 Fork 7

mirrors_Qihoo360/tensornet

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 1.46 KB
一键复制 编辑 原始数据 按行查看 历史
zhangyansheng 提交于 2020-12-07 11:51 . fix dockerfile compile error
FROM ubuntu:18.04
RUN apt-get update && apt-get install wget -y && \
apt-get install python3.7 -y && \
apt-get install python3-pip -y && \
apt-get install git -y && \
apt-get install libssl-dev -y && \
apt-get install lib32z1-dev -y && \
apt-get install curl -y
RUN wget https://github.com/bazelbuild/bazel/releases/download/3.1.0/bazel-3.1.0-linux-x86_64 && \
mv bazel-3.1.0-linux-x86_64 /usr/local/bin/bazel && \
chmod a+x /usr/local/bin/bazel
RUN pip3 install --upgrade pip && \
pip3 install tensorflow==2.3.0
RUN ln -s /usr/bin/python3.7 /usr/bin/python
RUN wget https://download.open-mpi.org/release/open-mpi/v1.4/openmpi-1.4.5.tar.gz && \
mkdir -p /root/opt && \
tar -zxf openmpi-1.4.5.tar.gz -C /root/opt/ && \
mv /root/opt/openmpi-1.4.5 /root/opt/openmpi && \
cd /root/opt/openmpi && \
./configure CFLAGS="-fPIC" CXXFlAGS="-fPIC" --prefix=/root/opt/openmpi --enable-static && \
make -j20 && \
make install
RUN git clone https://github.com/Qihoo360/tensornet.git && \
cd /tensornet && \
bash configure.sh --openmpi_path /root/opt/openmpi && \
bazel build -c opt //core:_pywrap_tn.so && \
cp -f /tensornet/bazel-bin/core/_pywrap_tn.so /tensornet/tensornet/core
ENV PATH "/root/opt/openmpi/bin:${PATH}"
ENV PYTHONPATH "/tensornet:${PYTHONPATH}"
ENV LD_LIBRARY_PATH="/root/opt/openmpi/lib:${LD_LIBRARY_PATH}"
CMD ["python", "-c", "import tensorflow as tf; import tensornet as tn; print(tn.version)"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/mirrors_Qihoo360/tensornet.git
git@gitee.com:mirrors_Qihoo360/tensornet.git
mirrors_Qihoo360
tensornet
tensornet
master

搜索帮助