Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add/dockerfile #210

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM python:3.6
MAINTAINER Marc Feger <marc.feger@uni-duesseldorf.de>

RUN apt-get update -yqq &&\
apt-get upgrade -yqq &&\
apt-get install gcc libenchant1c2a -yqq --fix-missing

COPY . /surprise
WORKDIR surprise

RUN pip install -Uq pip &&\
pip --quiet install -r requirements_dev.txt && \
pip --quiet install scikit-surprise && \
pip install -e .

RUN ["python", "setup.py", "install"]
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,47 @@ For the latest version, you can also clone the repo and build the source
$ git clone https://github.com/NicolasHug/surprise.git
$ cd surprise
$ python setup.py install

Docker
------
With [Docker](https://www.docker.com) it is possible to run a development environment on your local machine.
This is similar to a so called [Virtual Machine](https://www.virtualbox.org/) or [Virtual Environment](https://virtualenv.pypa.io/en/stable/).

You can download [Docker](https://www.docker.com) for any OS [here](https://www.docker.com/get-started).

If you have [Docker](https://www.docker.com) installed you are ready to go.

To create a image of surprise simply navigate to the directory where this project is stored and enter it.
This should look like this::

/Surprise
-> /doc
-> /example
-> /surprise
-> /tests
-> Dockerfile
-> ...

To create a image of Surprise run::

$ docker build -t surprise .

This will create a image named surprise which can be used for development.

To run a container use::

$ docker run -it -v "$PWD":/surprise surprise bash

This will start a container and mounts every change in the project to it.

You can then run every command inside the container or use the Dockerfile as a [interpreter](https://blog.jetbrains.com/pycharm/2015/12/using-docker-in-pycharm/)
for PyCharm.

Or you can simply run a test-container for testing your project by running::

$ docker run surprise pytest

Or simply run any other command you wish.

License
-------
Expand Down