How to use docker version of Weka

38 views
Skip to first unread message

raul.para...@gmail.com

unread,
Feb 24, 2024, 2:27:03 PMFeb 24
to python-weka-wrapper
Hi,

I would like to explore the use of Weka using the docker option. I've seen this tutorial: https://fracpete.github.io/python-weka-wrapper3/docker.html however, I have some doubts:
1- How to include a dataset inside the dockerfile?
2- Does it already include packages?
3- Do you have a simple full example to use weka using docker?

Thanks
Raúl

Peter Reutemann

unread,
Feb 25, 2024, 5:08:23 PMFeb 25
to python-we...@googlegroups.com
> I would like to explore the use of Weka using the docker option. I've seen this tutorial: https://fracpete.github.io/python-weka-wrapper3/docker.html however, I have some doubts:
> 1- How to include a dataset inside the dockerfile?

The easiest is to map directories from the host machine onto
directories in the container,e.g., using the -v option.

> 2- Does it already include packages?

The base images don't include any package. Docker uses a layer
approach and you can simply create your own Docker images (using the
ones that I supply as the base) with the necessary packages. That's
why the above mentioned documentation also shows how to do that.

> 3- Do you have a simple full example to use weka using docker?

The above article is supposed to be that. :-)

If you're not familiar with Docker, have a look at this introduction
that I put together a while ago:
https://www.data-mining.co.nz/docker-for-data-scientists/

Please note: you either need a Linux machine or if you're stuck with
Windows then use WSL2:
https://learn.microsoft.com/en-us/windows/wsl/

Cheers, Peter
--
Peter Reutemann
Dept. of Computer Science
University of Waikato, Hamilton, NZ
Mobile +64 22 190 2375
https://www.cs.waikato.ac.nz/~fracpete/
http://www.data-mining.co.nz/

Peter Reutemann

unread,
Feb 25, 2024, 8:52:43 PMFeb 25
to python-we...@googlegroups.com
> > 3- Do you have a simple full example to use weka using docker?

I've added a couple of usage examples to the docker documentation:
https://fracpete.github.io/python-weka-wrapper3/docker.html

Raúl Parada Medina

unread,
Mar 9, 2024, 7:02:03 PMMar 9
to python-we...@googlegroups.com
Thanks Peter,

I could setup and run the docker. I would like to add additional python libraries, however when I use the common pip3 install "library", I got this error message: ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/.local'

Check the permissions.

Is there a su password?

Best,
Raúl
--
You received this message because you are subscribed to a topic in the Google Groups "python-weka-wrapper" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python-weka-wrapper/ntatpNrt0d8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python-weka-wra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python-weka-wrapper/CAHoQ12J6yr573hg5w-%3DBs8%2BVzYUbrMncvDUWwZtb88UACVTaWw%40mail.gmail.com.

Peter Reutemann

unread,
Mar 10, 2024, 11:47:51 PMMar 10
to python-we...@googlegroups.com
> I could setup and run the docker. I would like to add additional python libraries, however when I use the common pip3 install "library", I got this error message: ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/.local'
>
> Check the permissions.
>
> Is there a su password?

You have to create your own docker image (when building the docker
image, you're basically root). The pww3 one can be the basis for that.

For installing additional libraries, you would use the RUN directive.

Here is a basic example of a derived Dockerfile:

FROM fracpete/pww3:0.2.14_cpu
RUN pip3 --no-cache-dir install THE_LIBRARIES_YOU_NEED
Reply all
Reply to author
Forward
0 new messages