Skip to content

Commit

Permalink
Update docker deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
bacox committed Jan 17, 2022
1 parent 902d825 commit 6cb23c3
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ EXPOSE 5000
COPY fltk ./fltk
COPY configs ./configs
#CMD python3 ./fltk/__main__.py single configs/experiment.yaml --rank=$RANK
CMD python3 -m fltk single configs/experiment_vanilla.yaml --rank=$RANK
# CMD python3 -m fltk single configs/experiment_vanilla.yaml --rank=$RANK
CMD python3 -m fltk single $EXP_CONFIG --rank=$RANK
#CMD python3 setup.py
1 change: 1 addition & 0 deletions deploy/templates/client_stub_default.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
client_name: # name can be anything
# container_name: federation-lab-client2 # what the name for this container would be
cpuset: {cpu_set}
restart: "no" # if it crashes for example
build: . # look for the docker file where this file is currently located
volumes:
Expand Down
24 changes: 24 additions & 0 deletions deploy/templates/client_stub_fast.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
client_name: # name can be anything
# container_name: federation-lab-client2 # what the name for this container would be
cpuset: {cpu_set}
restart: "no" # if it crashes for example
build: . # look for the docker file where this file is currently located
volumes:
# - ./docker_data:/opt/federation-lab/data
- ./data:/opt/federation-lab/data
- ./default_models:/opt/federation-lab/default_models
- ./data_loaders:/opt/federation-lab/data_loaders
- ./fltk:/opt/federation-lab/fltk
environment:
- PYTHONUNBUFFERED=1
- RANK={rank}
- WORLD_SIZE={world_size}
- EXP_CONFIG=${EXP_CONFIG_FILE}
ports:
- "5002:5000" # {machine-port}:{docker-port}
depends_on:
- "fl_server"
deploy:
resources:
limits:
cpus: '3'
3 changes: 2 additions & 1 deletion deploy/templates/client_stub_medium.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
client_name: # name can be anything
# container_name: federation-lab-client2 # what the name for this container would be
cpuset: {cpu_set}
restart: "no" # if it crashes for example
build: . # look for the docker file where this file is currently located
volumes:
Expand All @@ -20,4 +21,4 @@ client_name: # name can be anything
deploy:
resources:
limits:
cpus: '1'
cpus: '2'
3 changes: 2 additions & 1 deletion deploy/templates/client_stub_slow.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
client_name: # name can be anything
# container_name: federation-lab-client2 # what the name for this container would be
cpuset: {cpu_set}
restart: "no" # if it crashes for example
build: . # look for the docker file where this file is currently located
volumes:
Expand All @@ -20,4 +21,4 @@ client_name: # name can be anything
deploy:
resources:
limits:
cpus: '0.5'
cpus: '0.75'
1 change: 1 addition & 0 deletions deploy/templates/system_stub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ version: "3.3"
services:
fl_server: # name can be anything
container_name: federation-lab-server # what the name for this container would be
cpuset: '0'
restart: "no" # if it crashes for example
build: . # look for the docker file where this file is currently located
volumes:
Expand Down
4 changes: 3 additions & 1 deletion run_multi_exp.bash
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/bash

## declare an array variable
declare -a arr=("configs/experiment_vanilla.yaml"
declare -a arr=(
"configs/exp_p2_vanilla.yaml"
# "configs/experiment_vanilla.yaml"
# "configs/experiment_deadline.yaml"
# "configs/experiment_swyh.yaml"
# "configs/experiment_freeze.yaml"
Expand Down

0 comments on commit 6cb23c3

Please sign in to comment.