-
Notifications
You must be signed in to change notification settings - Fork 371
Build docker #515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Build docker #515
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| #FROM tensorflow/tensorflow:1.12.0 | ||
| FROM my_tensorflow_base:1.12.0-py2 | ||
|
|
||
| COPY docker/sources_18.04.list /etc/apt/sources.list | ||
|
|
||
| # necessary for later commands to take effect | ||
| RUN md5sum /etc/apt/sources.list \ | ||
| && apt-get update \ | ||
| && apt-get install apt-utils inetutils-ping wget curl telnet vim strace libpq-dev curl libsasl2-dev gcc g++ unzip openjdk-8-jdk -y \ | ||
| && apt-get install build-essential cython -y \ | ||
| && pip install cython \ | ||
| && pip install setuptools_scm | ||
| # 检查 Cython 是否安装成功 | ||
| RUN python -c "import Cython" | ||
| RUN pip --version | ||
|
|
||
| RUN mkdir /EasyRec | ||
| COPY requirements /EasyRec/requirements | ||
| COPY requirements.txt /EasyRec/ | ||
| COPY easy_rec /EasyRec/easy_rec/ | ||
| COPY setup.cfg /EasyRec/ | ||
| COPY setup.py /EasyRec/ | ||
| COPY MANIFEST.in /EasyRec/ | ||
| COPY README.md /EasyRec/ | ||
| COPY scripts /EasyRec/scripts | ||
|
|
||
| RUN curl "http://easyrec.oss-cn-beijing.aliyuncs.com/tools/odpscmd_public_0.45.0.zip" -o /EasyRec/odpscmd_public.zip | ||
| RUN mkdir /usr/local/odps_clt/ && cd /usr/local/odps_clt/ && unzip /EasyRec/odpscmd_public.zip | ||
| RUN ln -s /usr/local/odps_clt/bin/odpscmd /usr/local/bin/odpscmd | ||
|
|
||
| RUN pip install pystack-debugger idna kafka-python -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com | ||
| # 升级pip | ||
| RUN pip install --upgrade pip setuptools wheel | ||
|
|
||
| # 安装 setuptools-rust 和 rustc | ||
| RUN pip install setuptools-rust | ||
| RUN pip install tensorflow_probability==0.5.0 | ||
| RUN apt-get update && apt-get install -y rustc | ||
| RUN apt-get update && \ | ||
| apt-get install -y rustc && \ | ||
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \ | ||
| . $HOME/.cargo/env | ||
| # 安装 cryptography | ||
| RUN pip install cryptography | ||
| # 安装基础工具链与依赖项 | ||
| RUN apt-get update && \ | ||
| apt-get install -y build-essential libssl-dev libffi-dev python-dev && \ | ||
| apt-get install -y rustc cargo cmake curl | ||
|
|
||
| # 设置国内的 Rust 镜像源 | ||
| RUN echo '[source.crates-io]\n' > $HOME/.cargo/config | ||
| RUN echo 'replace-with = "ustc"' >> $HOME/.cargo/config | ||
| RUN echo '[source.ustc]\n' >> $HOME/.cargo/config | ||
| RUN echo 'registry = "https://mirrors.ustc.edu.cn/crates.io-index"' >> $HOME/.cargo/config | ||
|
|
||
| # 确保 curl 支持 HTTP2 | ||
| RUN curl -V | ||
|
|
||
| # 显示安装好的工具链版本,确保已正确安装 | ||
| RUN rustc --version | ||
| RUN cargo --version | ||
| RUN cmake --version | ||
|
|
||
| RUN pip install -r /EasyRec/requirements/runtime.txt -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com | ||
| RUN pip install -r /EasyRec/requirements/extra.txt -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com | ||
|
|
||
| RUN pip install --user -U https://tfsmoke1.oss-cn-zhangjiakou.aliyuncs.com/tunnel_paiio/common_io/py2/common_io-0.1.0-cp27-cp27mu-linux_x86_64.whl | ||
| RUN pip install graphlearn | ||
|
|
||
| RUN cd /EasyRec && python setup.py install | ||
| RUN rm -rf /EasyRec | ||
| RUN python -c "import easy_rec; import pyhive; import datahub; import kafka" | ||
|
|
||
| COPY docker/hadoop_env.sh /opt/hadoop_env.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| FROM datascience-registry.cn-beijing.cr.aliyuncs.com/tensorflow/tensorflow:1.15.5 | ||
|
|
||
| COPY docker/sources_18.04.list /etc/apt/sources.list | ||
|
|
||
| # necessary for later commands to take effect | ||
| RUN md5sum /etc/apt/sources.list | ||
|
|
||
| RUN apt-get update | ||
| RUN apt-get install apt-utils inetutils-ping wget curl telnet vim strace libpq-dev curl libsasl2-dev gcc g++ unzip openjdk-8-jdk -y | ||
|
|
||
| RUN mkdir /EasyRec | ||
| COPY requirements /EasyRec/requirements | ||
| COPY requirements.txt /EasyRec/ | ||
| COPY easy_rec /EasyRec/easy_rec/ | ||
| COPY setup.cfg /EasyRec/ | ||
| COPY setup.py /EasyRec/ | ||
| COPY MANIFEST.in /EasyRec/ | ||
| COPY README.md /EasyRec/ | ||
| COPY scripts /EasyRec/scripts | ||
|
|
||
| RUN curl "http://easyrec.oss-cn-beijing.aliyuncs.com/tools/odpscmd_public_0.45.0.zip" -o /EasyRec/odpscmd_public.zip | ||
| RUN mkdir /usr/local/odps_clt/ && cd /usr/local/odps_clt/ && unzip /EasyRec/odpscmd_public.zip | ||
| RUN ln -s /usr/local/odps_clt/bin/odpscmd /usr/local/bin/odpscmd | ||
| RUN pip3 install --upgrade pip | ||
| RUN pip3 install pystack-debugger idna kafka-python -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com | ||
| RUN pip3 install -r /EasyRec/requirements/runtime.txt | ||
| RUN pip3 install -r /EasyRec/requirements/extra.txt -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com | ||
| RUN pip3 install http://easyrec.oss-cn-beijing.aliyuncs.com/3rdparty/graphlearn-1.1.0-cp36-cp36m-linux_x86_64.whl -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com | ||
| RUN pip3 install http://easyrec.oss-cn-beijing.aliyuncs.com/releases/pai_automl-0.0.1rc1-py3-none-any.whl -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com | ||
| RUN pip3 install http://easyrec.oss-cn-beijing.aliyuncs.com/3rdparty/common_io-0.3.0-cp36-cp36m-linux_x86_64.whl -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com | ||
| RUN pip3 install tensorflow_probability==0.8 | ||
| RUN cd /EasyRec && pip install . | ||
| RUN rm -rf /EasyRec | ||
| RUN python -c "import easy_rec; easy_rec.help(); import pyhive; import datahub; import kafka" | ||
|
|
||
| COPY docker/hadoop_env.sh /opt/hadoop_env.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| FROM tensorflow/tensorflow:2.12.0 | ||
| COPY docker/sources_20.04.list /etc/apt/sources.list | ||
|
|
||
| # necessary for later commands to take effect | ||
| RUN md5sum /etc/apt/sources.list | ||
|
|
||
| RUN apt-get update | ||
| RUN apt-get install apt-utils inetutils-ping wget curl telnet vim strace libpq-dev curl libsasl2-dev gcc g++ unzip openjdk-8-jdk -y | ||
|
|
||
| RUN mkdir /EasyRec | ||
| COPY requirements /EasyRec/requirements | ||
| COPY requirements.txt /EasyRec/ | ||
| COPY easy_rec /EasyRec/easy_rec/ | ||
| COPY setup.cfg /EasyRec/ | ||
| COPY setup.py /EasyRec/ | ||
| COPY MANIFEST.in /EasyRec/ | ||
| COPY README.md /EasyRec/ | ||
| COPY scripts /EasyRec/scripts | ||
|
|
||
| RUN curl "http://easyrec.oss-cn-beijing.aliyuncs.com/tools/odpscmd_public_0.45.0.zip" -o /EasyRec/odpscmd_public.zip | ||
| RUN mkdir /usr/local/odps_clt/ && cd /usr/local/odps_clt/ && unzip /EasyRec/odpscmd_public.zip | ||
| RUN ln -s /usr/local/odps_clt/bin/odpscmd /usr/local/bin/odpscmd | ||
|
|
||
| RUN pip3 install pystack-debugger idna kafka-python -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com | ||
| RUN pip3 install -r /EasyRec/requirements/runtime.txt -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com | ||
| RUN pip3 install -r /EasyRec/requirements/extra.txt -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com | ||
| RUN pip3 install https://easyrec.oss-cn-beijing.aliyuncs.com/3rdparty/graphlearn-1.1.0-cp38-cp38-linux_x86_64.whl -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com | ||
| # RUN pip3 install http://easyrec.oss-cn-beijing.aliyuncs.com/releases/pai_automl-0.0.1rc1-py3-none-any.whl -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com | ||
| RUN pip3 install tensorflow_probability==0.20.0 | ||
| #RUN pip3 install encodings | ||
| RUN pip3 install https://dlc-task.oss-cn-hangzhou.aliyuncs.com/whl/common_io-0.4.1%2Btunnel-py2.py3-none-any.whl -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com | ||
| RUN cd /EasyRec && python setup.py install | ||
| RUN rm -rf /EasyRec | ||
| # RUN python -c "import easy_rec; easy_rec.help(); import pyhive; import datahub; import kafka" | ||
|
|
||
| COPY docker/hadoop_env.sh /opt/hadoop_env.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,14 +36,14 @@ cd EasyRec | |
|
|
||
| -- Docker环境可选 | ||
| (1) `python=3.6.9` + `tenserflow=1.15.5` | ||
| docker pull mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/easyrec/easyrec:py36-tf1.15-0.7.4 | ||
| docker run -td --network host -v /local_path/EasyRec:/docker_path/EasyRec mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/easyrec/easyrec:py36-tf1.15-0.7.4 | ||
| docker pull mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/easyrec/easyrec:py36-tf1.15-0.8.5 | ||
| docker run -td --network host -v /local_path/EasyRec:/docker_path/EasyRec mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/easyrec/easyrec:py36-tf1.15-0.8.5 | ||
| docker exec -it <CONTAINER_ID> bash | ||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 上面tf1.15的镜像也更新下:mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/easyrec/easyrec:py36-tf1.15-0.8.5 |
||
|
|
||
| (2) `python=3.8.10` + `tenserflow=2.10.0` | ||
| docker pull mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/easyrec/easyrec:py38-tf2.10-0.7.4 | ||
| docker run -td --network host -v /local_path/EasyRec:/docker_path/EasyRec mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/easyrec/easyrec:py38-tf2.10-0.7.4 | ||
| (2) `python=3.8.10` + `tenserflow=2.12.0` | ||
| docker pull mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/easyrec/easyrec:py38-tf2.12-0.8.5 | ||
| docker run -td --network host -v /local_path/EasyRec:/docker_path/EasyRec mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/easyrec/easyrec:py38-tf2.12-0.8.5 | ||
|
|
||
| docker exec -it <CONTAINER_ID> bash | ||
| ``` | ||
|
|
@@ -56,12 +56,12 @@ cd EasyRec | |
|
|
||
| -- Docker环境可选 | ||
| (1) `python=3.6.9` + `tenserflow=1.15.5` | ||
| bash scripts/build_docker.sh | ||
| bash scripts/build_docker_tf115.sh | ||
| sudo docker run -td --network host -v /local_path:/docker_path mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/easyrec/easyrec:py36-tf1.15-<easyrec_version> | ||
|
|
||
| (2) `python=3.8.10` + `tenserflow=2.10.0` | ||
| bash scripts/build_docker_tf210.sh | ||
| sudo docker run -td --network host -v /local_path:/docker_path mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/easyrec/easyrec:py38-tf2.10-<easyrec_version> | ||
| (2) `python=3.8.10` + `tenserflow=2.12.0` | ||
| bash scripts/build_docker_tf212.sh | ||
| sudo docker run -td --network host -v /local_path:/docker_path mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/easyrec/easyrec:py38-tf2.12-<easyrec_version> | ||
|
|
||
| sudo docker exec -it <CONTAINER_ID> bash | ||
| ``` | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| #!/bin/bash | ||
|
|
||
| bash scripts/gen_proto.sh | ||
| if [ $? -ne 0 ] | ||
| then | ||
| echo "gen proto failed" | ||
| exit 1 | ||
| fi | ||
|
|
||
| version=`grep "__version__" easy_rec/version.py | awk '{ if($1 == "__version__") print $NF}'` | ||
| # strip "'" | ||
| version=${version//\'/} | ||
| echo "EasyRec Version: $version" | ||
|
|
||
| if [ -z "$version" ] | ||
| then | ||
| echo "Failed to get EasyRec version" | ||
| exit 1 | ||
| fi | ||
|
|
||
| sudo docker build --network=host . -f docker/Dockerfile_tf112 -t mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/easyrec/easyrec:py27-tf1.12-${version} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| #!/bin/bash | ||
|
|
||
| bash scripts/gen_proto.sh | ||
| if [ $? -ne 0 ] | ||
| then | ||
| echo "gen proto failed" | ||
| exit 1 | ||
| fi | ||
|
|
||
| version=`grep "__version__" easy_rec/version.py | awk '{ if($1 == "__version__") print $NF}'` | ||
| # strip "'" | ||
| version=${version//\'/} | ||
| echo "EasyRec Version: $version" | ||
|
|
||
| if [ -z "$version" ] | ||
| then | ||
| echo "Failed to get EasyRec version" | ||
| exit 1 | ||
| fi | ||
|
|
||
| sudo docker build --network=host . -f docker/Dockerfile_tf115 -t mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/easyrec/easyrec:py36-tf1.15-${version} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| #!/bin/bash | ||
|
|
||
| bash scripts/gen_proto.sh | ||
| if [ $? -ne 0 ] | ||
| then | ||
| echo "gen proto failed" | ||
| exit 1 | ||
| fi | ||
|
|
||
| version=`grep "__version__" easy_rec/version.py | awk '{ if($1 == "__version__") print $NF}'` | ||
| # strip "'" | ||
| version=${version//\'/} | ||
| echo "EasyRec Version: $version" | ||
|
|
||
| if [ -z "$version" ] | ||
| then | ||
| echo "Failed to get EasyRec version" | ||
| exit 1 | ||
| fi | ||
|
|
||
| sudo docker build --network=host . -f docker/Dockerfile_tf212 -t mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/easyrec/easyrec:py38-tf2.12-${version} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个文件里的镜像版本都改一下啊,改成你最新打的包的路径; 2.10 -> 2.12