Skip to content

Commit 5dae195

Browse files
committed
added 0.2.9
1 parent 8cabb8f commit 5dae195

File tree

7 files changed

+300
-1
lines changed

7 files changed

+300
-1
lines changed

docker/0.2.9_cpu/Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM ubuntu:20.04
2+
3+
ENV DEBIAN_FRONTEND noninteractive
4+
RUN apt-get update && \
5+
apt-get install -y libglib2.0-0 libsm6 libxrender-dev libxext6 libgl1-mesa-glx git wget && \
6+
apt-get install -y build-essential python3-dev python3-venv python3-pip && \
7+
apt-get install -y graphviz libgraphviz-dev && \
8+
apt-get install -y openjdk-8-jdk && \
9+
apt-get clean && \
10+
rm -rf /var/lib/apt/lists/*
11+
12+
RUN pip3 --no-cache-dir install numpy matplotlib pygraphviz && \
13+
pip3 --no-cache-dir install python-javabridge && \
14+
pip3 --no-cache-dir install python-weka-wrapper3==0.2.9
15+
16+
COPY bash.bashrc /etc/bash.bashrc
17+
18+
ENV WEKA_HOME=/workspace/wekafiles
19+
WORKDIR /workspace
20+
RUN chmod 777 /workspace

docker/0.2.9_cpu/README.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# python-weka-wrapper3 Docker (CPU)
2+
3+
## Docker
4+
5+
### Build local image
6+
7+
* Build the image from Docker file (from within `docker/cpu`)
8+
9+
```commandline
10+
docker build -t pww3_cpu .
11+
```
12+
13+
* Run the container
14+
15+
```commandline
16+
docker run -v /local/dir:/container/dir -it pww3_cpu
17+
```
18+
`/local/dir:/container/dir` maps a local disk directory into a directory inside the container
19+
20+
## Pre-built images
21+
22+
* Build
23+
24+
```commandline
25+
docker build -t pww3:0.2.9_cpu .
26+
```
27+
28+
* Tag
29+
30+
```commandline
31+
docker tag \
32+
pww3:0.2.9_cpu \
33+
fracpete/pww3:0.2.9_cpu
34+
```
35+
36+
* Push
37+
38+
```commandline
39+
docker push fracpete/pww3:0.2.9_cpu
40+
```
41+
42+
### Special directories
43+
44+
* `/workspace/wekafiles` - the directory that `WEKA_HOME` is pointing to (packages, props files, etc)
45+
46+
47+
## Usage
48+
49+
### Basic
50+
51+
For using the image interactively, you can run the following command:
52+
53+
```bash
54+
docker run -u $(id -u):$(id -g) \
55+
-it fracpete/pww3:0.2.9_cpu
56+
```
57+
58+
**NB:** Use `-v localdir:containerdir` to map directories from your host into the container.
59+
60+
### With local packages
61+
62+
Instead of having to reinstall your packages each time you start up the container,
63+
you can map your local Weka packages into the container as follows:
64+
65+
```bash
66+
docker run -u $(id -u):$(id -g) \
67+
-v $HOME/wekafiles/:/workspace/wekafiles \
68+
-it fracpete/pww3:0.2.9_cpu
69+
```
70+
71+
**NB:** That way, you can separate various package installations on your host system
72+
in different directories.

docker/0.2.9_cpu/bash.bashrc

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
2+
# Copyright 2020 University of Waikato, Hamilton, NZ. All Rights Reserved.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# ==============================================================================
17+
18+
export PS1="\[\e[31m\]docker\[\e[m\] \[\e[33m\]\w\[\e[m\] > "
19+
export TERM=xterm-256color
20+
alias grep="grep --color=auto"
21+
alias ls="ls --color=auto"
22+
23+
echo -e "\e[1;31m"
24+
cat<<DBG
25+
_____
26+
_ ____ ____ _|___ /
27+
| '_ \\ \\ /\\ / /\\ \\ /\\ / / |_ \\
28+
| |_) \\ V V / \\ V V / ___) |
29+
| .__/ \\_/\\_/ \\_/\\_/ |____/
30+
|_|
31+
32+
0.2.9, OpenJDK 8, Python 3.8
33+
34+
DBG
35+
echo -e "\e[0;33m"
36+
37+
if [[ $EUID -eq 0 ]]; then
38+
cat <<WARN
39+
WARNING: You are running this container as root, which can cause new files in
40+
mounted volumes to be created as the root user on your host machine.
41+
42+
To avoid this, run the container by specifying your user's userid:
43+
44+
$ docker run -u \$(id -u):\$(id -g) args...
45+
WARN
46+
else
47+
cat <<EXPL
48+
You are running this container as user with ID $(id -u) and group $(id -g),
49+
which should map to the ID and group for your user on the Docker host. Great!
50+
EXPL
51+
fi
52+
53+
# Turn off colors
54+
echo -e "\e[m"

docker/0.2.9_cuda10.2/Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM nvidia/cuda:10.2-devel-ubuntu18.04
2+
3+
ENV DEBIAN_FRONTEND noninteractive
4+
RUN apt-get update && \
5+
apt-get install -y libglib2.0-0 libsm6 libxrender-dev libxext6 libgl1-mesa-glx git wget && \
6+
apt-get install -y build-essential python3.8-dev python3.8-venv python3.8-distutils && \
7+
apt-get install -y graphviz libgraphviz-dev && \
8+
apt-get install -y openjdk-8-jdk && \
9+
apt-get clean && \
10+
rm -rf /var/lib/apt/lists/*
11+
12+
RUN wget -O /tmp/get-pip.py https://bootstrap.pypa.io/get-pip.py && \
13+
python3.8 /tmp/get-pip.py
14+
RUN python3.8 -m pip --no-cache-dir install numpy matplotlib pygraphviz && \
15+
python3.8 -m pip --no-cache-dir install python-javabridge && \
16+
python3.8 -m pip --no-cache-dir install python-weka-wrapper3==0.2.9
17+
18+
COPY bash.bashrc /etc/bash.bashrc
19+
20+
ENV WEKA_HOME=/workspace/wekafiles
21+
WORKDIR /workspace
22+
RUN chmod 777 /workspace

docker/0.2.9_cuda10.2/README.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# python-weka-wrapper3 Docker (CPU)
2+
3+
## Docker
4+
5+
### Build local image
6+
7+
* Build the image from Docker file (from within `docker/cpu`)
8+
9+
```commandline
10+
docker build -t pww3_cuda10.2 .
11+
```
12+
13+
* Run the container
14+
15+
```commandline
16+
docker run --gpus=all -v /local/dir:/container/dir -it pww3_cuda10.2
17+
```
18+
`/local/dir:/container/dir` maps a local disk directory into a directory inside the container
19+
20+
## Pre-built images
21+
22+
* Build
23+
24+
```commandline
25+
docker build -t pww3:0.2.9_cuda10.2 .
26+
```
27+
28+
* Tag
29+
30+
```commandline
31+
docker tag \
32+
pww3:0.2.9_cuda10.2 \
33+
fracpete/pww3:0.2.9_cuda10.2
34+
```
35+
36+
* Push
37+
38+
```commandline
39+
docker push fracpete/pww3:0.2.9_cuda10.2
40+
```
41+
42+
### Special directories
43+
44+
* `/workspace/wekafiles` - the directory that `WEKA_HOME` is pointing to (packages, props files, etc)
45+
46+
47+
## Usage
48+
49+
### Basic
50+
51+
For using the image interactively, you can run the following command:
52+
53+
```bash
54+
docker run --gpus=all -u $(id -u):$(id -g) \
55+
-it fracpete/pww3:0.2.9_cuda10.2
56+
```
57+
58+
**NB:** Use `-v localdir:containerdir` to map directories from your host into the container.
59+
60+
### With local packages
61+
62+
Instead of having to reinstall your packages each time you start up the container,
63+
you can map your local Weka packages into the container as follows:
64+
65+
```bash
66+
docker run --gpus=all -u $(id -u):$(id -g) \
67+
-v $HOME/wekafiles/:/workspace/wekafiles \
68+
-it fracpete/pww3:0.2.9_cuda10.2
69+
```
70+
71+
**NB:** That way, you can separate various package installations on your host system
72+
in different directories.

docker/0.2.9_cuda10.2/bash.bashrc

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
2+
# Copyright 2020 University of Waikato, Hamilton, NZ. All Rights Reserved.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# ==============================================================================
17+
18+
export PS1="\[\e[31m\]docker\[\e[m\] \[\e[33m\]\w\[\e[m\] > "
19+
export TERM=xterm-256color
20+
alias grep="grep --color=auto"
21+
alias ls="ls --color=auto"
22+
23+
echo -e "\e[1;31m"
24+
cat<<DBG
25+
_____
26+
_ ____ ____ _|___ /
27+
| '_ \\ \\ /\\ / /\\ \\ /\\ / / |_ \\
28+
| |_) \\ V V / \\ V V / ___) |
29+
| .__/ \\_/\\_/ \\_/\\_/ |____/
30+
|_|
31+
32+
0.2.9, OpenJDK 8, Python 3.8, CUDA 10.2
33+
34+
DBG
35+
echo -e "\e[0;33m"
36+
37+
if [[ $EUID -eq 0 ]]; then
38+
cat <<WARN
39+
WARNING: You are running this container as root, which can cause new files in
40+
mounted volumes to be created as the root user on your host machine.
41+
42+
To avoid this, run the container by specifying your user's userid:
43+
44+
$ docker run -u \$(id -u):\$(id -g) args...
45+
WARN
46+
else
47+
cat <<EXPL
48+
You are running this container as user with ID $(id -u) and group $(id -g),
49+
which should map to the ID and group for your user on the Docker host. Great!
50+
EXPL
51+
fi
52+
53+
# Turn off colors
54+
echo -e "\e[m"

docker/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
In order to make installation reproducible, the following Docker images
44
(which can be used interactively) are maintained:
55

6-
* python-weka-wrapper3 v0.2.8
6+
* 0.2.9
7+
8+
* [CPU only](0.2.9_cpu)
9+
* [CUDA 10.2](0.2.9_cuda10.2)
10+
11+
* 0.2.8
712

813
* [CPU only](0.2.8_cpu)
914
* [CUDA 10.2](0.2.8_cuda10.2)

0 commit comments

Comments
 (0)