Skip to content

Commit

Permalink
Update required Python to 3.7 (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
parasj authored Mar 22, 2022
1 parent bba7bcd commit 42ad665
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 61 deletions.
15 changes: 2 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
# syntax=docker/dockerfile:1
FROM coinor/cylp
RUN ln -s /usr/bin/python3 /usr/bin/python && ln -s /usr/bin/pip3 /usr/bin/pip
RUN --mount=type=cache,target=/root/.cache/pip pip3 install cvxpy ray numpy pandas tqdm matplotlib graphviz

# # install CoinOR
# ARG DEBIAN_FRONTEND="noninteractive"
# ENV TZ="America/Los_Angeles"
# RUN --mount=type=cache,target=/var/cache/apt apt update \
# && apt-get install --no-install-recommends -y git wget ca-certificates build-essential gcc g++ gfortran pkg-config libblas-dev liblapack-dev coinor-libcbc-dev libz-dev \
# && apt-get clean \
# && rm -rf /var/lib/apt/lists/*
# RUN --mount=type=cache,target=/root/.cache/pip pip install numpy && pip install cylp
FROM python:3.10-slim

# increase number of open files and concurrent TCP connections
RUN (echo 'net.ipv4.ip_local_port_range = 12000 65535' >> /etc/sysctl.conf) \
Expand All @@ -23,7 +12,7 @@ RUN (echo 'net.ipv4.ip_local_port_range = 12000 65535' >> /etc/sysctl.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 graphviz \
&& apt-get install --no-install-recommends -y git wget ca-certificates build-essential graphviz \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Skylark is composed of two components: A ReplicatorClient that runs locally on y
This package represents both components as a single binary. Docker builds a single container with the GatewayDaemon and pushes it to the Github Container Registry (ghcr.io). After provisioning an instance, a GatewayDaemon is started by launching that container. Therefore, it's simple and fast to launch a new Gateway.

### Requirements
* Python 3.8 or greater
* Python 3.7 or greater
* Docker
* **Ensure you have authenticated your Github account with Docker**: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry
* TLDR:
Expand Down
12 changes: 0 additions & 12 deletions scripts/ray_cluster/README.md

This file was deleted.

31 changes: 0 additions & 31 deletions scripts/ray_cluster/script.py

This file was deleted.

4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name="skylark",
version="0.1",
packages=["skylark"],
python_requires=">=3.8",
python_requires=">=3.7",
install_requires=[
"awscrt",
"azure-identity",
Expand Down Expand Up @@ -43,9 +43,9 @@
"matplotlib",
"pandas",
"questionary",
"ray",
"typer",
],
"experiments": ["ray"],
"test": ["black", "ipython", "jupyter_console", "pytest", "pytype"],
},
entry_points={"console_scripts": ["skylark=skylark.cli.cli:app"]},
Expand Down
2 changes: 1 addition & 1 deletion skylark/compute/gcp/gcp_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(
def uuid(self):
return f"{self.region_tag}:{self.gcp_instance_name}"

@lru_cache
@lru_cache(maxsize=1)
def get_gcp_instance(self):
instances = self.auth.get_gcp_instances(self.gcp_region)
if "items" in instances:
Expand Down
2 changes: 1 addition & 1 deletion skylark/compute/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from skylark.utils import logger


@lru_cache
@lru_cache(maxsize=1)
def query_which_cloud() -> str:
if (
subprocess.call(
Expand Down

0 comments on commit 42ad665

Please sign in to comment.