Skip to content

Commit a2e3d48

Browse files
committed
prepared for release
1 parent 30078af commit a2e3d48

File tree

6 files changed

+153
-3
lines changed

6 files changed

+153
-3
lines changed

doc/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@
5353
# built documents.
5454
#
5555
# The short X.Y version.
56-
version = '0.3.1'
56+
version = '0.3.2'
5757
# The full version, including alpha/beta/rc tags.
58-
release = '0.3.1'
58+
release = '0.3.2'
5959

6060
# The language for content autogenerated by Sphinx. Refer to documentation
6161
# for a list of supported languages.

docker/0.3.2_cpu/Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM ubuntu:22.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-11-jdk && \
9+
apt-get clean && \
10+
rm -rf /var/lib/apt/lists/*
11+
12+
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
13+
RUN pip3 --no-cache-dir install setuptools wheel && \
14+
pip3 --no-cache-dir install python-weka-wrapper3==0.3.2
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.3.2_cpu/README.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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/0.3.2_cpu`)
8+
9+
```bash
10+
docker build -t pww3_cpu .
11+
```
12+
13+
* Run the container
14+
15+
```bash
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+
```bash
25+
docker build -t pww3:0.3.2_cpu .
26+
```
27+
28+
* Tag
29+
30+
```bash
31+
docker tag \
32+
pww3:0.3.2_cpu \
33+
fracpete/pww3:0.3.2_cpu
34+
```
35+
36+
* Push
37+
38+
```bash
39+
docker push fracpete/pww3:0.3.2_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.3.2_cpu
56+
```
57+
58+
**NB:**
59+
60+
* Use `-v localdir:containerdir` to map directories from your host into the container.
61+
* Use `--rm` to automatically remove the container when you are exiting it.
62+
63+
### With local packages
64+
65+
Instead of having to reinstall your packages each time you start up the container,
66+
you can map your local Weka packages into the container as follows:
67+
68+
```bash
69+
docker run -u $(id -u):$(id -g) \
70+
-v $HOME/wekafiles/:/workspace/wekafiles \
71+
-it fracpete/pww3:0.3.2_cpu
72+
```
73+
74+
**NB:** With this approach you can separate various package installations on your host system
75+
in different directories.

docker/0.3.2_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.3.2, OpenJDK 11, Python 3.10
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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ In order to make installation reproducible, the following Docker images
55

66
jpype-based:
77

8+
* 0.3.2 ([CPU only](0.3.2_cpu))
89
* 0.3.1 ([CPU only](0.3.1_cpu))
910
* 0.3.0 ([CPU only](0.3.0_cpu))
1011

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def _read(f):
5555
"weka": ["lib/*.jar"],
5656
},
5757
include_package_data=True,
58-
version="0.3.1",
58+
version="0.3.2",
5959
author='Peter "fracpete" Reutemann',
6060
author_email='[email protected]',
6161
install_requires=[

0 commit comments

Comments
 (0)