- docker repo: https://github.com/okwrtdsh/anaconda3
- study repo: https://github.com/AndersonJo/machine-learning
- Download pkg from https://docs.docker.com/docker-for-mac/install/
- Install it
git clone https://github.com/yoonkwon/ml-cop
docker build --rm -t ml-cop:latest .
#make .env file on osx
./osx.sh
docker-compose up -d
- new > python3
- write code below
#In[1]
from sklearn import linear_model
reg = linear_model.LinearRegression()
reg.fit([[0, 0], [1, 1], [2, 2]], [0, 1, 2])
reg.coef_
- click Run button and check the output
#Out[2]
array([0.5, 0.5])
docker-compose down
docker exec -ti ml-cop_jupyter_1 /bin/bash
$ pip install some_package_name