Skip to content

Commit

Permalink
Merge branch 'main' into dev/paras/solver2
Browse files Browse the repository at this point in the history
  • Loading branch information
parasj committed Jan 30, 2022
2 parents ed9c160 + aab2d6c commit 25133f3
Show file tree
Hide file tree
Showing 58 changed files with 8,757 additions and 1,351 deletions.
19 changes: 18 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
# syntax=docker/dockerfile:1
FROM python:3.8-slim

# increase number of open files and concurrent TCP connections
RUN echo 'net.ipv4.ip_local_port_range = 12000 65535' >> /etc/sysctl.conf
RUN echo 'fs.file-max = 1048576' >> /etc/sysctl.conf
RUN mkdir -p /etc/security/
RUN echo '* soft nofile 1048576' >> /etc/security/limits.conf
RUN echo '* hard nofile 1048576' >> /etc/security/limits.conf
RUN echo 'root soft nofile 1048576' >> /etc/security/limits.conf
RUN echo 'root hard nofile 1048576' >> /etc/security/limits.conf

# install apt packages
RUN --mount=type=cache,target=/var/cache/apt apt update \
&& apt-get install --no-install-recommends -y git wget ca-certificates build-essential rsync \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# install gateway
COPY scripts/requirements-gateway.txt /tmp/requirements-gateway.txt
RUN --mount=type=cache,target=/root/.cache/pip pip install --no-cache-dir --compile -r /tmp/requirements-gateway.txt && rm -r /tmp/requirements-gateway.txt

WORKDIR /pkg
COPY . .
RUN pip install -e .
CMD ["python", "skylark/gateway/gateway_daemon.py"]
CMD ["python", "skylark/gateway/gateway_daemon.py"]
2 changes: 1 addition & 1 deletion nb/01-04-2021_plot_udp_throughput.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"import numpy as np\n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"from loguru import logger\n",
"from skylark.utils import logger\n",
"\n",
"import pickle\n",
"import json\n",
Expand Down
2 changes: 1 addition & 1 deletion nb/11-16-2021_plot_latency.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"from loguru import logger\n",
"from skylark.utils import logger\n",
"\n",
"import pickle\n",
"import json\n",
Expand Down
2 changes: 1 addition & 1 deletion nb/11-16-2021_plot_throughput.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"import numpy as np\n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"from loguru import logger\n",
"from skylark.utils import logger\n",
"\n",
"import pickle\n",
"import json\n",
Expand Down
2 changes: 1 addition & 1 deletion nb/11-22-2021_plot_throughput_time.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"import numpy as np\n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"from loguru import logger\n",
"from skylark.utils import logger\n",
"from tqdm import tqdm\n",
"\n",
"import pickle\n",
Expand Down
2 changes: 1 addition & 1 deletion nb/11-22-2021_throughput_solver.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"import numpy as np\n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"from loguru import logger\n",
"from skylark.utils import logger\n",
"from tqdm import tqdm\n",
"\n",
"import pickle\n",
Expand Down
2 changes: 1 addition & 1 deletion nb/12-02-2021_gcp_premium_standard.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"import numpy as np\n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"from loguru import logger\n",
"from skylark.utils import logger\n",
"\n",
"import pickle\n",
"import json\n",
Expand Down
2 changes: 1 addition & 1 deletion nb/12-11-2021_get_transfer_cost.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"import numpy as np\n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"from loguru import logger\n",
"from skylark.utils import logger\n",
"\n",
"import pickle\n",
"import requests\n",
Expand Down
2 changes: 1 addition & 1 deletion nb/12-12-2021_visualize_pareto.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"import numpy as np\n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"from loguru import logger\n",
"from skylark.utils import logger\n",
"\n",
"import seaborn as sns\n",
"\n",
Expand Down
7,054 changes: 7,054 additions & 0 deletions profiles/throughput.csv

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function benchmark_config {
NUM_GATEWAYS=$2
# N_CHUNKS_PER_CONNECTION * NUM_CONNECTIONS
N_CHUNKS=$((N_CHUNKS_PER_CONNECTION * NUM_CONNECTIONS))
echo "skylark replicate-random $SRC_REGION $DST_REGION $INTER_REGION --chunk-size-mb $CHUNK_SIZE_MB --n-chunks $N_CHUNKS --num-gateways $NUM_GATEWAYS --num-outgoing-connections $NUM_CONNECTIONS --no-reuse-gateways --no-serve-web-dashboard"
echo "skylark replicate-random $SRC_REGION $DST_REGION $INTER_REGION --chunk-size-mb $CHUNK_SIZE_MB --n-chunks $N_CHUNKS --num-gateways $NUM_GATEWAYS --num-outgoing-connections $NUM_CONNECTIONS --no-reuse-gateways"
}

# log function with message argument
Expand Down
2 changes: 1 addition & 1 deletion scripts/experiments/num_gateways/benchmark_num_gateways.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function benchmark_config {
NUM_GATEWAYS=$2
N_CHUNKS=$((N_CHUNKS_PER_CONNECTION * NUM_CONNECTIONS * NUM_GATEWAYS))
set -x
skylark replicate-random $SRC_REGION $DST_REGION $INTER_REGION --chunk-size-mb $CHUNK_SIZE_MB --n-chunks $N_CHUNKS --num-gateways $NUM_GATEWAYS --num-outgoing-connections $NUM_CONNECTIONS --no-serve-web-dashboard --aws-instance-class m5.4xlarge
skylark replicate-random $SRC_REGION $DST_REGION $INTER_REGION --chunk-size-mb $CHUNK_SIZE_MB --n-chunks $N_CHUNKS --num-gateways $NUM_GATEWAYS --num-outgoing-connections $NUM_CONNECTIONS --aws-instance-class m5.4xlarge
set +x
}

Expand Down
4 changes: 3 additions & 1 deletion scripts/requirements-gateway.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ azure-mgmt-resource
azure-mgmt-compute
azure-mgmt-network
azure-identity
azure-storage-blob
awscrt
boto3
flask
google-api-python-client
google-cloud-compute
loguru
google-cloud-storage
setproctitle
termcolor
tqdm
werkzeug
oslo.concurrency
Expand Down
2 changes: 1 addition & 1 deletion scripts/test_gateway.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
set -x
sudo DOCKER_BUILDKIT=1 docker build -t gateway_test .
sudo docker run --rm --ipc=host --network=host --name=skylark_gateway gateway_test python /pkg/skylark/gateway/gateway_daemon.py --chunk-dir /dev/shm/skylark_test/chunks
sudo docker run --rm --ipc=host --network=host --name=skylark_gateway gateway_test python /pkg/skylark/gateway/gateway_daemon.py --chunk-dir /dev/shm/skylark_test/chunks --region aws:us-east-1 --outgoing-ports "{}"
10 changes: 4 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@
"azure-mgmt-compute",
"azure-mgmt-network",
"azure-identity",
"azure-storage-blob>=12.0.0",
"awscrt",
"boto3",
"flask",
"google-api-python-client",
"google-cloud-compute",
"loguru",
"google-cloud-storage",
"setproctitle",
"termcolor",
"tqdm",
"werkzeug",
],
Expand All @@ -39,9 +41,5 @@
],
"test": ["black", "ipython", "jupyter_console", "pytest", "pytype"],
},
entry_points={
"console_scripts": [
"skylark=skylark.cli.cli:app",
]
},
entry_points={"console_scripts": ["skylark=skylark.cli.cli:app"]},
)
2 changes: 1 addition & 1 deletion skylark/benchmark/network/latency.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import re
from typing import List, Tuple

from loguru import logger
from skylark.utils import logger
from tqdm import tqdm

from skylark import skylark_root
Expand Down
205 changes: 0 additions & 205 deletions skylark/benchmark/network/throughput.py

This file was deleted.

2 changes: 1 addition & 1 deletion skylark/benchmark/network/traceroute.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import json
from typing import List, Tuple

from loguru import logger
from skylark.utils import logger
from tqdm import tqdm

from skylark import skylark_root
Expand Down
Loading

0 comments on commit 25133f3

Please sign in to comment.