Skip to content

Commit 3c16eff

Browse files
committed
fix dockerfile using tf2.3.0
1 parent 7824852 commit 3c16eff

10 files changed

+27
-18
lines changed

Diff for: .travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
before_install:
77
- export DELTA_PATH=`pwd`; echo $DELTA_PATH
88
- export DOCKER_DELTA="/home/gitlab-runner/delta"; echo $DOCKER_DELTA
9-
- export CI_IMAGE=zh794390558/delta:ci-cpu-py3
9+
- export CI_IMAGE=zh794390558/delta:2.3.0-ci-cpu-py3
1010
- docker pull ${CI_IMAGE}
1111
- docker run -it -d --name travis_con --user root -v ${DELTA_PATH}:${DOCKER_DELTA} ${CI_IMAGE} bash
1212
- docker exec travis_con bash -c "gcc -v && g++ -v"

Diff for: docker/build.sh

+13-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
set -x
23

34
if [ $# != 3 ];then
45
echo "usage: $0 [ci|delta|deltann] [cpu|gpu] [build|push|dockerfile]"
@@ -34,7 +35,7 @@ fi
3435

3536
TAG=${TF_VER}-${TARGET}-${DEVICE}-py3
3637
DOCKER='sudo docker'
37-
PIP_INSTALL="pip --no-cache-dir install -i https://pypi.tuna.tsinghua.edu.cn/simple/"
38+
PIP_INSTALL="pip --no-cache-dir install -i https://mirrors.aliyun.com/pypi/simple"
3839

3940
set -e
4041
set -u
@@ -48,14 +49,19 @@ on_exit() {
4849
trap on_exit HUP INT PIPE QUIT TERM EXIT
4950

5051

52+
# https://hub.docker.com/r/tensorflow/tensorflow
53+
# Versioned images <= 1.15.0 (1.x) and <= 2.1.0 (2.x) have Python 3
54+
# (3.5 for Ubuntu 16-based images; 3.6 for Ubuntu 18-based images) in images tagged "-py3"
55+
# and Python 2.7 in images without "py" in the tag.
56+
# All newer images are Python 3 only. Tags containing -py3 are deprecated.
5157
if [ ${DEVICE} == 'cpu' ] && [ ${TARGET} == 'deltann' ];then
52-
IMAGE=tensorflow/tensorflow:devel-py3
58+
IMAGE=tensorflow/tensorflow:devel
5359
elif [ ${DEVICE} == 'gpu' ] && [ ${TARGET} == 'deltann' ];then
54-
IMAGE=tensorflow/tensorflow:devel-gpu-py3
60+
IMAGE=tensorflow/tensorflow:devel-gpu
5561
elif [ ${DEVICE} == 'cpu' ] && [ ${TARGET} == 'delta' ] || [ ${TARGET} == 'ci' ];then
56-
IMAGE=tensorflow/tensorflow:${TF_VER}-py3
62+
IMAGE=tensorflow/tensorflow:${TF_VER}
5763
elif [ ${DEVICE} == 'gpu' ] && [ ${TARGET} == 'delta' ] || [ ${TARGET} == 'ci' ];then
58-
IMAGE=tensorflow/tensorflow:${TF_VER}-gpu-py3
64+
IMAGE=tensorflow/tensorflow:${TF_VER}-gpu
5965
else
6066
echo "no support target or device"
6167
exit -1
@@ -134,11 +140,11 @@ if [ $MODE == 'push' ] || [ $MODE == 'build' ];then
134140
$DOCKER pull $IMAGE
135141

136142
# build image
137-
$DOCKER build --no-cache=false -t delta:$TAG -f $DOCKERFILE . || { echo "build ${TARGET} ${DEVICE} error"; exit 1; }
143+
$DOCKER build --no-cache=false -t zh794390558/delta:$TAG -f $DOCKERFILE . || { echo "build ${TARGET} ${DEVICE} error"; exit 1; }
138144

139145
#push image
140146
if [ $MODE == 'push' ];then
141-
$DOCKER tag delta:${TAG} zh794390558/delta:${TAG}
147+
#$DOCKER tag delta:${TAG} zh794390558/delta:${TAG}
142148
$DOCKER push zh794390558/delta:$TAG
143149

144150
if [ $? == 0 ]; then

Diff for: docker/dockerfile.ci.cpu

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM tensorflow/tensorflow:2.3.0-py3
1+
FROM tensorflow/tensorflow:2.3.0
22
COPY sources.list.ubuntu18.04 /etc/apt/sources.list
33

44
# install tools
@@ -7,6 +7,6 @@ RUN /bin/bash /install.sh
77

88
COPY requirements.txt /ci/requirements.txt
99
WORKDIR /ci
10-
RUN sudo pip --no-cache-dir install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade pip && pip --no-cache-dir install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --user -r requirements.txt
10+
RUN sudo pip --no-cache-dir install -i https://mirrors.aliyun.com/pypi/simple --upgrade pip && pip --no-cache-dir install -i https://mirrors.aliyun.com/pypi/simple --user -r requirements.txt
1111

1212
CMD ["/bin/bash", "-c"]

Diff for: docker/dockerfile.delta.cpu

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM tensorflow/tensorflow:2.3.0-py3
1+
FROM tensorflow/tensorflow:2.3.0
22
COPY sources.list.ubuntu18.04 /etc/apt/sources.list
33

44
# install tools

Diff for: docker/dockerfile.delta.gpu

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM tensorflow/tensorflow:2.3.0-gpu-py3
1+
FROM tensorflow/tensorflow:2.3.0-gpu
22
COPY sources.list.ubuntu18.04 /etc/apt/sources.list
33

44
# install tools

Diff for: docker/dockerfile.deltann.cpu

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM tensorflow/tensorflow:devel-py3
1+
FROM tensorflow/tensorflow:devel
22
COPY sources.list.ubuntu18.04 /etc/apt/sources.list
33

44
# install tools

Diff for: docker/dockerfile.deltann.gpu

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM tensorflow/tensorflow:devel-gpu-py3
1+
FROM tensorflow/tensorflow:devel-gpu
22
COPY sources.list.ubuntu18.04 /etc/apt/sources.list
33

44
# install tools

Diff for: docker/requirements.txt

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
matplotlib
66
sklearn
77
pandas
8-
librosa
8+
librosa>=0.7.2
9+
numba==0.48.0 #must be this by librosa>=0.7.2
910
absl-py
1011
jieba
12+
wget
1113
kaldiio
1214
soundfile
1315
textgrid
@@ -28,4 +30,5 @@ pyAudioAnalysis
2830
flake8
2931
sentencepiece
3032
deepdiff
31-
tensorflow_addons
33+
tensorflow-addons==0.11.1
34+
tensorflow-model-optimization

Diff for: env.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ else
1414
fi
1515

1616
# need version
17-
export TF_VER=2.0.0
17+
export TF_VER=2.3.0
1818
export PY_VER=3.6
1919

2020
# root dir

Diff for: tools/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ pyAudioAnalysis
3030
flake8
3131
sentencepiece
3232
deepdiff
33-
tensorflow-addons==0.6.0
33+
tensorflow-addons==0.11.1
3434
tensorflow-model-optimization

0 commit comments

Comments
 (0)