Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Commit

Permalink
DO-43 🐳 ✨ Add docker-compose file with minio
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Kravetz committed Jan 7, 2020
1 parent 83b8a64 commit 497ecdc
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 1 deletion.
File renamed without changes.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,15 @@ $ python xain_fl/cli.py --help

### Run the Coordinator from a Docker image

There are two docker-compose files, one for development and one for release.

Development image
---

To run the coordinator's development image, first build the Docker image:

```shell
$ docker build -t xain-fl-dev -f dev.dockerfile .
$ docker build -t xain-fl-dev -f Dockerfile.dev .
```

Then run the image, mounting the directory as a Docker volume, and call the
Expand All @@ -110,6 +112,22 @@ And then run it (this example assumes you'll want to use the default port):
$ docker run -p 50051:50051 xain-fl
```

### Docker-compose

Development
---

```shell
$ docker-compose -f docker-compose-dev.yml up
```

Release
---

```shell
$ docker-compose up
```

## Related Papers and Articles

- [An introduction to XAIN’s GDPR-compliance Layer for Machine Learning](https://medium.com/xain/an-introduction-to-xains-gdpr-compliance-layer-for-machine-learning-f7c321b31b06)
Expand Down
40 changes: 40 additions & 0 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: "3.7"
services:

minio:
image: minio/minio # Stable minio
volumes:
- minio-data:/data
networks:
- xain-fl
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
command: server /data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
ports:
- "9000:9000"

xain-fl:
build:
context: .
dockerfile: Dockerfile.dev
command: coordinator -f test_array.npy
volumes:
- '.:/app'
# don't use the local egg-info, if one exists
- '/app/xain_fl.egg-info'
networks:
- xain-fl
ports:
- "50051:50051"

volumes:
minio-data:

networks:
xain-fl:
35 changes: 35 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
version: "3.7"
services:

minio:
image: minio/minio # Stable minio
volumes:
- minio-data:/data
networks:
- xain-fl
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
command: server /data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
expose:
- "9000"

xain-fl:
build:
context: .
dockerfile: Dockerfile
networks:
- xain-fl
ports:
- "50051:50051"

volumes:
minio-data:

networks:
xain-fl:

0 comments on commit 497ecdc

Please sign in to comment.