-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
23 lines (18 loc) · 957 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM tensorflow/tensorflow:2.3.0-gpu
WORKDIR /app/
COPY Pipfile Pipfile
RUN pip install --upgrade pip && \
pip install pipenv && \
pipenv install --system --skip-lock
COPY src/training src/training
COPY main.py main.py
# 利用するdockerイメージのPythonバージョンが3.6なので、
# Python 3.9以降用の型アノテーションを削除する必要がある
RUN find . -name "*.py" | xargs sed -i.bak -e "s/ \-> tuple\[.*\]//g" && \
find . -name "*.py" | xargs sed -i.bak -e "s/: tuple\[.*\],/,/g" && \
find . -name "*.py" | xargs sed -i.bak -e "s/: tuple\[.*\])/)/g" && \
find . -name "*.py" | xargs sed -i.bak -e "s/: tuple\[.*\] //g" && \
find . -name "*.py" | xargs sed -i.bak -e "s/ \-> list\[.*\]//g" && \
find . -name "*.py" | xargs sed -i.bak -e "s/: list\[.*\],/,/g" && \
find . -name "*.py" | xargs sed -i.bak -e "s/: list\[.*\])/)/g" && \
find . -name "*.py" | xargs sed -i.bak -e "s/: list\[.*\] //g"