Skip to content

igormaraujo/docker-lpsolve-python3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Container lpsolve with Python 3.7 and Jupyter Lab

Tested on Ubuntu 18.04.3 LTS, Docker version 19.03.5

A ready-to-use environment of Jupyter Lab v1.2.1 and lpsolve v.5.5.2.5 with Python 3.7

Getting Started

Prerequisites

Docker

Installing

From Docker Hub

  1. Create and start the container with name lpsolve
docker run --name lpsolve igormaraujo/lpsolve-python3

Build image from Dockerfile

  1. Download and extract the project zip file or git clone the repository.
  2. In the terminal, inside the project folder where has the Dockerfile, use the command below to build the Docker Image:
docker build --rm -t lpsolve .
  1. Create and start the container with name lpsolve
docker run --name lpsolve lpsolve

Options

  • Port Forwarding
docker run -p 8001:8888 --name lpsolve igormaraujo/lpsolve-python3
  • Volume (A volume allows data to persist, even when a container is deleted. Volumes are also a convenient way to share data between the host and the container)
docker run -v "$HOME":/home/jovyan/work --name lpsolve igormaraujo/lpsolve-python3

Useful commands

  • Starting a container already created
docker start lpsolve
  • Get jupyter notebook token
docker exec lpsolve jupyter notebook list
  • Docker container terminal as root
docker exec -it --user root lpsolve bash

Running the tests

  1. Access the URL [http://localhost:8888] from a browser 1.1 (Optional) Enter with the notebook token
  2. The folder examples has two notebook document: ex.ipynb with a variety of simples usage cases, and example1.ipnb with a detail usage case. Both examples are included in lpsolve python extension (Optional) It is possible to install python libraries as numpy, with the command in the JupyterLab terminals:
conda install numpy

Uninstalling

  1. Remove docker lpsolve container (WARNING! The data not inside the volume mounted will be LOST)
docker rm lpsolve

From Docker Hub

  1. Remove docker image
docker image rm igormaraujo/lpsolve-python3

Build image from Dockerfile

  1. Remove docker image
docker image rm lpsolve

Built With

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

About

A ready-to-use environment of lpsolve v.5.5.2.5 and Jupyter Lab v1.2.1 with Python 3.7

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors