Skip to content

Commit

Permalink
🐎 ci(Docker): Update docker-publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
KarhouTam committed Apr 6, 2024
1 parent e132c8a commit 54d65a7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .environment/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ RUN apt update && \

WORKDIR /root

RUN git clone https://github.com/KarhouTam/FL-bench.git
COPY .environment/requirements.txt /tmp

WORKDIR /root/FL-bench
RUN pip install --upgrade pip && \
pip install -r /tmp/requirements.txt

RUN pip install -r .environment/requirements.txt

# port for visdom
EXPOSE 8097
4 changes: 3 additions & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Docker-Publish

on:
push:
branches: [ "master" ]
paths:
- '.environment/**'
- '.github/workflows/docker-publish.yml'


env:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ docker pull ghcr.io/karhoutam/fl-bench:master
docker pull docker.io/karhoutam/fl-bench:master

# An example for building container
docker run -it --name fl-bench --privileged -p 8097:8097 --gpus all ghcr.io/karhoutam/fl-bench:master
docker run -it --name fl-bench -v path/to/FL-bench:/root/FL-bench --privileged --gpus all ghcr.io/karhoutam/fl-bench:master
```


Expand All @@ -161,14 +161,14 @@ ALL classes of methods are inherited from `FedAvgServer` and `FedAvgClient`. If

### Step 1. Generate FL Dataset
```shell
# Partition the CIFAR-10 according to Dir(0.1) for 100 clients
python generate_data.py -d cifar10 -a 0.1 -cn 100
# Partition the MNIST according to Dir(0.1) for 100 clients
python generate_data.py -d mnist -a 0.1 -cn 100
```
About methods of generating federated dastaset, go check [`data/README.md`](data/#readme) for full details.


### Step 2. Run Experiment
`python main.py <method> <your_config_file.yml> [method_args...]`
`python main.py <method> [your_config_file.yml] [method_args...]`

❗ Method name should be identical to the `.py` file name in `src/server`.

Expand Down

0 comments on commit 54d65a7

Please sign in to comment.