Skip to content

Commit 41abfd3

Browse files
JamesChevalierrushter
authored andcommitted
add docker configuration (rushter#13)
* add docker configuration Why: * it's a nice way to work in a disposable environment This change addresses the need by: * add dockerfile * update readme to explain usage Reference Links: * * switch to using official python image as a base Why: * removes a lot of custom setup This change addresses the need by: * swap out buildpack-deps:trusty with python:3 * remove setup lines that are no longer required * clean up comment to describe the RUN command Reference Links: * https://hub.docker.com/r/library/python/
1 parent 830f68a commit 41abfd3

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Dockerfile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM python:3
2+
3+
RUN mkdir -p /var/app
4+
WORKDIR /var/app
5+
COPY . /var/app
6+
7+
# install scipy & numpy
8+
# install required packages
9+
RUN pip install scipy numpy && \
10+
pip install .

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,11 @@ All algorithms are implemented in Python, using numpy, scipy and autograd.
3737
cd MLAlgorithms
3838
python -m examples.linear_models
3939

40+
### How to run examples within Docker
41+
cd MLAlgorithms
42+
docker build -t mlalgorithms .
43+
docker run --rm -it mlalgorithms bash
44+
python -m examples.linear_models
45+
4046
### Contributing
4147
Your contributions are always welcome!

0 commit comments

Comments
 (0)