Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.

Added runtime evaluations for NLP Textclassification #3

Open
wants to merge 53 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
39b7757
Update dockerfile
tsenst Mar 6, 2021
3921368
Create docker-image.yml
tsenst Mar 6, 2021
469e669
Update docker-image.yml
tsenst Mar 6, 2021
7eb1ac6
Merge branch 'master' of https://github.com/tsenst/nvidia-docker-keras
tsenst Mar 6, 2021
93a2ea9
Update docker-image.yml
tsenst Mar 6, 2021
ec34d95
Update docker-image.yml
tsenst Mar 6, 2021
8ff7a60
Merge branch 'master' of https://github.com/tsenst/nvidia-docker-keras
tsenst Mar 6, 2021
a7b9458
use 2.3.1 tensorflow image
tsenst Mar 6, 2021
be07718
Update requirements.txt
tsenst Mar 6, 2021
3a9e574
Update requirements.txt
tsenst Mar 6, 2021
d9b4bdf
Update requirements.txt
tsenst Mar 6, 2021
b7ecf9c
Print devices used
tsenst Mar 6, 2021
f21209c
Print devices used
tsenst Mar 6, 2021
a489ee6
Implement bert model
tsenst Mar 7, 2021
112916d
Reduce tensorflow-text and models version
tsenst Mar 7, 2021
1406118
Add some additional prints
tsenst Mar 7, 2021
b3ee379
Add some additional prints
tsenst Mar 7, 2021
f2fa687
reduce epochs to 2
tsenst Mar 7, 2021
d8c935f
reduce epochs to 2
tsenst Mar 7, 2021
6628c47
fix bert model inference
tsenst Mar 7, 2021
7fed0ae
* fix bert prediction
tsenst Mar 8, 2021
31868a2
Build CPU version with avx
tsenst Mar 9, 2021
5fe5584
Update Dockerfile.cpu
tsenst Mar 9, 2021
30000d0
Update docker-image.yml
tsenst Mar 9, 2021
5b52f34
Update Dockerfile.cpu
tsenst Mar 10, 2021
a7c0239
Build CPU version with avx
tsenst Mar 9, 2021
be8a76f
Update Dockerfile.cpu
tsenst Mar 10, 2021
ef64fac
Update Dockerfile.cpu
tsenst Mar 10, 2021
18ed2de
Update Dockerfile.cpu
tsenst Mar 10, 2021
af4548a
Update Dockerfile.cpu
tsenst Mar 10, 2021
67a3f20
Build CPU version with avx
tsenst Mar 10, 2021
1057241
Merge branch 'master' of https://github.com/tsenst/nvidia-docker-keras
tsenst Mar 10, 2021
7381c87
Build CPU version with avx
tsenst Mar 12, 2021
c42b723
Bugfix cpu docker
tsenst Mar 12, 2021
551c0f8
Update docker-image.yml
tsenst Mar 14, 2021
3480f8f
* update Dockerfile.cpu
tsenst Mar 16, 2021
91133b6
* update Dockerfile.cpu
tsenst Mar 16, 2021
9db4a3c
* update Dockerfile.cpu
tsenst Mar 16, 2021
db55684
* update Dockerfile.cpu
tsenst Mar 16, 2021
511e6fb
Add runtime plots
tsenst Mar 19, 2021
ebfe6ba
Add runtime plots
tsenst Mar 19, 2021
ad8c2e0
Add plot figures and pngs
tsenst Mar 19, 2021
3e4eeca
update html figures
tsenst Mar 19, 2021
f195dda
update scatter plots
tsenst Mar 19, 2021
03355fd
update layout
tsenst Mar 19, 2021
23ad8d5
update layout
tsenst Mar 19, 2021
8aabbb9
update layout
tsenst Mar 19, 2021
ae997a6
Update README.md
tsenst Mar 20, 2021
655e4e5
training now tests different batch sizes
tsenst Apr 15, 2021
fb779fe
Merge remote-tracking branch 'origin/master'
tsenst Apr 15, 2021
422ba0b
fix different batch sizes
tsenst Apr 15, 2021
db773ae
different batch sizes only for MLP
tsenst Apr 15, 2021
3c2efd8
different batch sizes only for MLP
tsenst Apr 15, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Docker Image CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:

build:

runs-on: ubuntu-latest

steps:

- name: Check Out Repo
uses: actions/checkout@v2

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1



- name: Build and push cpu
id: docker_build_cpu
uses: docker/build-push-action@v2
with:
context: ./
file: ./NLP/Dockerfile.cpu
push: true
tags: torlof/nlp-cpu-docker-keras:latest
log-level: error

- name: Build and push gpu
id: docker_build_gpu
uses: docker/build-push-action@v2
with:
context: ./
file: ./NLP/Dockerfile.gpu
push: true
tags: torlof/nlp-nvidia-docker-keras:latest

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions NLP/Dockerfile.cpu
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM tensorflow/tensorflow:2.3.1

COPY ./NLP/src /src

WORKDIR /src

RUN pip install -r requirements.txt

ENV PYTHONPATH='/src/:$PYTHONPATH'

CMD ["python", "train.py"]
11 changes: 11 additions & 0 deletions NLP/Dockerfile.gpu
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM tensorflow/tensorflow:2.3.1-gpu

COPY ./NLP/src /src

WORKDIR /src

RUN pip install -r requirements.txt

ENV PYTHONPATH='/src/:$PYTHONPATH'

CMD ["python", "train.py"]
62 changes: 62 additions & 0 deletions NLP/Dockerfile.tensorflow
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
FROM ubuntu:20.04

RUN apt update
RUN apt install -y python3-dev python3-pip python3-venv wget curl gnupg git sudo

RUN ln -s /usr/bin/python3 /usr/bin/python && \
ln -s /usr/bin/pip3 /usr/bin/pip

ENV PYTHONPATH=/tensorflow/lib \
PYTHON_ARG=/tensorflow/lib \
USE_BAZEL_VERSION=3.3.0 \
TF_NEED_CUDA=0 \
TF_NEED_GCP=0 \
TF_CUDA_COMPUTE_CAPABILITIES=5.2,3.5 \
TF_NEED_HDFS=0 \
TF_NEED_OPENCL=0 \
TF_NEED_JEMALLOC=0 \
TF_ENABLE_XLA=0 \
TF_NEED_VERBS=0 \
TF_CUDA_CLANG=0 \
TF_DOWNLOAD_CLANG=0 \
TF_NEED_MKL=0 \
TF_DOWNLOAD_MKL=0 \
TF_NEED_MPI=0 \
TF_NEED_S3=1 \
TF_NEED_KAFKA=0 \
TF_NEED_GDR=0 \
TF_NEED_OPENCL_SYCL=0 \
TF_SET_ANDROID_WORKSPACE=0 \
TF_NEED_AWS=0 \
TF_NEED_IGNITE=0 \
TF_NEED_ROCM=0 \
GCC_HOST_COMPILER_PATH="/usr/bin/gcc" \
CC_OPT_FLAGS="-march=native"

RUN pip3 install pip six 'numpy<1.19.0' wheel setuptools mock 'future>=0.17.1' && \
pip3 install keras_applications --no-deps && \
pip3 install keras_preprocessing --no-deps

RUN git clone https://github.com/tensorflow/tensorflow.git
WORKDIR /tensorflow
RUN git checkout r2.3

RUN curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg
RUN mv bazel.gpg /etc/apt/trusted.gpg.d/
RUN echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list
RUN apt update && apt install -y bazel-3.3.0
RUN ln -s /usr/bin/bazel-3.3.0 /usr/bin/bazel

RUN ./configure

RUN bazel build -c opt \
--copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-mfpmath=both \
--copt=-w \
--jobs=26 \
//tensorflow/tools/pip_package:build_pip_package


RUN ./bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg

RUN pip install /tmp/tensorflow_pkg/tensorflow-2.3.2-cp38-cp38-linux_x86_64.whl

4 changes: 4 additions & 0 deletions NLP/src/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
numpy
tensorflow-datasets
tensorflow-text==2.3.0
tf-models-official==2.3.0
Loading