forked from OpenMined/PySyft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
48 lines (37 loc) · 1.28 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
.PHONY: install develop test notebook \
docker-build-base docker-build docker-build-dev docker-run \
run-redis run-capsule run-allservices
# Platform-agnostic targets, will run locally and inside Docker,
# provided that the right dependencies are present
install:
pip3 install -r requirements.txt
python3 setup.py install
develop:
pip3 install -r dev-requirements.txt
python3 setup.py develop
test:
@# Remove pyc files to avoid conflict if tests are run locally
@# and inside container at the same time
@find . -name '*.pyc' -exec rm -f '{}' \;
pip3 install -r test-requirements.txt
pytest && flake8 --ignore=E501
notebook:
jupyter notebook --allow-root --ip=0.0.0.0
# Docker-related targets, to build and run a prod and a dev images
docker-build-base:
docker build -f dockerfiles/Dockerfile.base -t pysyft-base:local .
docker-build: docker-build-base
docker build -f dockerfiles/Dockerfile -t openmined/pysyft:local .
docker-build-dev: docker-build-base
docker build -f dockerfiles/Dockerfile.dev -t openmined/pysyft-dev:local .
image = openmined/pysyft:local
docker-run:
docker run -it --rm \
-v "$(PWD)":/PySyft \
-p 8888:8888 \
"$(image)" sh
run-redis:
redis-server &
run-capsule:
python3 /usr/bin/Capsule/capsule_zmq/local_server.py &
run-allservices: run-redis run-capsule