Skip to content

Commit

Permalink
prepared for release
Browse files Browse the repository at this point in the history
  • Loading branch information
fracpete committed Oct 10, 2022
1 parent f8597c2 commit a81fd33
Show file tree
Hide file tree
Showing 10 changed files with 300 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Changelog
=========

0.2.11 (????-??-??)
0.2.11 (2022-10-11)
-------------------

- methods `install_packages` and `install_missing_packages` of module `weka.core.packages` now
Expand Down
4 changes: 2 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Preparation:
* sphinx-apidoc -f -o ../../doc/source .
* make sure that all modules are included in `index.rst` (apart from `modules.rst`)

* update package suggestions by generating list of packages/classes within `weka-HEAD/packages`:
* update package suggestions by generating list of packages/classes within `weka-HEAD/trunk/packages`:

```bash
find -name "*.java" | grep -v "\/dist\/" | grep "src\/main" | \
sed s/".*internal\/"//g | sed s/".*external\/"//g | \
sed s/"\.java"//g | sed s/"\/src\/main\/java\/"/","/g | \
sed s/"\/"/.""/g | sort -f > ../../../../fracpete/python-weka-wrapper3/python/weka/lib/pkg_suggestions.csv
sed s/"\/"/.""/g | sort -f > ../../../../../fracpete/python-weka-wrapper3/python/weka/lib/pkg_suggestions.csv
```

* add new changelog section in `CHANGES.rst`
Expand Down
4 changes: 2 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
# built documents.
#
# The short X.Y version.
version = '0.2.10'
version = '0.2.11'
# The full version, including alpha/beta/rc tags.
release = '0.2.10'
release = '0.2.11'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
20 changes: 20 additions & 0 deletions docker/0.2.11_cpu/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM ubuntu:20.04

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get install -y libglib2.0-0 libsm6 libxrender-dev libxext6 libgl1-mesa-glx git wget && \
apt-get install -y build-essential python3-dev python3-venv python3-pip && \
apt-get install -y graphviz libgraphviz-dev && \
apt-get install -y openjdk-8-jdk && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN pip3 --no-cache-dir install numpy matplotlib pygraphviz && \
pip3 --no-cache-dir install python-javabridge && \
pip3 --no-cache-dir install python-weka-wrapper3==0.2.11

COPY bash.bashrc /etc/bash.bashrc

ENV WEKA_HOME=/workspace/wekafiles
WORKDIR /workspace
RUN chmod 777 /workspace
72 changes: 72 additions & 0 deletions docker/0.2.11_cpu/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# python-weka-wrapper3 Docker (CPU)

## Docker

### Build local image

* Build the image from Docker file (from within `docker/0.2.11_cpu`)

```commandline
docker build -t pww3_cpu .
```

* Run the container

```commandline
docker run -v /local/dir:/container/dir -it pww3_cpu
```
`/local/dir:/container/dir` maps a local disk directory into a directory inside the container

## Pre-built images

* Build

```commandline
docker build -t pww3:0.2.11_cpu .
```

* Tag

```commandline
docker tag \
pww3:0.2.11_cpu \
fracpete/pww3:0.2.11_cpu
```

* Push

```commandline
docker push fracpete/pww3:0.2.11_cpu
```

### Special directories

* `/workspace/wekafiles` - the directory that `WEKA_HOME` is pointing to (packages, props files, etc)


## Usage

### Basic

For using the image interactively, you can run the following command:

```bash
docker run -u $(id -u):$(id -g) \
-it fracpete/pww3:0.2.11_cpu
```

**NB:** Use `-v localdir:containerdir` to map directories from your host into the container.

### With local packages

Instead of having to reinstall your packages each time you start up the container,
you can map your local Weka packages into the container as follows:

```bash
docker run -u $(id -u):$(id -g) \
-v $HOME/wekafiles/:/workspace/wekafiles \
-it fracpete/pww3:0.2.11_cpu
```

**NB:** That way, you can separate various package installations on your host system
in different directories.
54 changes: 54 additions & 0 deletions docker/0.2.11_cpu/bash.bashrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
# Copyright 2020 University of Waikato, Hamilton, NZ. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# ==============================================================================

export PS1="\[\e[31m\]docker\[\e[m\] \[\e[33m\]\w\[\e[m\] > "
export TERM=xterm-256color
alias grep="grep --color=auto"
alias ls="ls --color=auto"

echo -e "\e[1;31m"
cat<<DBG
_____
_ ____ ____ _|___ /
| '_ \\ \\ /\\ / /\\ \\ /\\ / / |_ \\
| |_) \\ V V / \\ V V / ___) |
| .__/ \\_/\\_/ \\_/\\_/ |____/
|_|

0.2.11, OpenJDK 8, Python 3.8

DBG
echo -e "\e[0;33m"

if [[ $EUID -eq 0 ]]; then
cat <<WARN
WARNING: You are running this container as root, which can cause new files in
mounted volumes to be created as the root user on your host machine.

To avoid this, run the container by specifying your user's userid:

$ docker run -u \$(id -u):\$(id -g) args...
WARN
else
cat <<EXPL
You are running this container as user with ID $(id -u) and group $(id -g),
which should map to the ID and group for your user on the Docker host. Great!
EXPL
fi

# Turn off colors
echo -e "\e[m"
22 changes: 22 additions & 0 deletions docker/0.2.11_cuda10.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM nvidia/cuda:10.2-devel-ubuntu18.04

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get install -y libglib2.0-0 libsm6 libxrender-dev libxext6 libgl1-mesa-glx git wget && \
apt-get install -y build-essential python3.8-dev python3.8-venv python3.8-distutils && \
apt-get install -y graphviz libgraphviz-dev && \
apt-get install -y openjdk-8-jdk && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN wget -O /tmp/get-pip.py https://bootstrap.pypa.io/get-pip.py && \
python3.8 /tmp/get-pip.py
RUN python3.8 -m pip --no-cache-dir install numpy matplotlib pygraphviz && \
python3.8 -m pip --no-cache-dir install python-javabridge && \
python3.8 -m pip --no-cache-dir install python-weka-wrapper3==0.2.11

COPY bash.bashrc /etc/bash.bashrc

ENV WEKA_HOME=/workspace/wekafiles
WORKDIR /workspace
RUN chmod 777 /workspace
72 changes: 72 additions & 0 deletions docker/0.2.11_cuda10.2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# python-weka-wrapper3 Docker (CUDA 10.2)

## Docker

### Build local image

* Build the image from Docker file (from within `docker/0.2.11_cuda10.2`)

```commandline
docker build -t pww3_cuda10.2 .
```

* Run the container

```commandline
docker run --gpus=all -v /local/dir:/container/dir -it pww3_cuda10.2
```
`/local/dir:/container/dir` maps a local disk directory into a directory inside the container

## Pre-built images

* Build

```commandline
docker build -t pww3:0.2.11_cuda10.2 .
```

* Tag

```commandline
docker tag \
pww3:0.2.11_cuda10.2 \
fracpete/pww3:0.2.11_cuda10.2
```

* Push

```commandline
docker push fracpete/pww3:0.2.11_cuda10.2
```

### Special directories

* `/workspace/wekafiles` - the directory that `WEKA_HOME` is pointing to (packages, props files, etc)


## Usage

### Basic

For using the image interactively, you can run the following command:

```bash
docker run --gpus=all -u $(id -u):$(id -g) \
-it fracpete/pww3:0.2.11_cuda10.2
```

**NB:** Use `-v localdir:containerdir` to map directories from your host into the container.

### With local packages

Instead of having to reinstall your packages each time you start up the container,
you can map your local Weka packages into the container as follows:

```bash
docker run --gpus=all -u $(id -u):$(id -g) \
-v $HOME/wekafiles/:/workspace/wekafiles \
-it fracpete/pww3:0.2.11_cuda10.2
```

**NB:** That way, you can separate various package installations on your host system
in different directories.
54 changes: 54 additions & 0 deletions docker/0.2.11_cuda10.2/bash.bashrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
# Copyright 2020 University of Waikato, Hamilton, NZ. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# ==============================================================================

export PS1="\[\e[31m\]docker\[\e[m\] \[\e[33m\]\w\[\e[m\] > "
export TERM=xterm-256color
alias grep="grep --color=auto"
alias ls="ls --color=auto"

echo -e "\e[1;31m"
cat<<DBG
_____
_ ____ ____ _|___ /
| '_ \\ \\ /\\ / /\\ \\ /\\ / / |_ \\
| |_) \\ V V / \\ V V / ___) |
| .__/ \\_/\\_/ \\_/\\_/ |____/
|_|

0.2.11, OpenJDK 8, Python 3.8, CUDA 10.2

DBG
echo -e "\e[0;33m"

if [[ $EUID -eq 0 ]]; then
cat <<WARN
WARNING: You are running this container as root, which can cause new files in
mounted volumes to be created as the root user on your host machine.

To avoid this, run the container by specifying your user's userid:

$ docker run -u \$(id -u):\$(id -g) args...
WARN
else
cat <<EXPL
You are running this container as user with ID $(id -u) and group $(id -g),
which should map to the ID and group for your user on the Docker host. Great!
EXPL
fi

# Turn off colors
echo -e "\e[m"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def _read(f):
"weka": ["lib/*.jar"],
},
include_package_data=True,
version="0.2.10",
version="0.2.11",
author='Peter "fracpete" Reutemann',
author_email='[email protected]',
install_requires=[
Expand Down

0 comments on commit a81fd33

Please sign in to comment.