diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a14dffb..43a51fe 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,7 +20,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest container: - image: ghcr.io/faasm/cpython:0.4.0 + image: ghcr.io/faasm/cpython:0.5.0 steps: - name: "Fetch code" uses: actions/checkout@v4 @@ -41,7 +41,7 @@ jobs: REDIS_QUEUE_HOST: redis REDIS_STATE_HOST: redis container: - image: ghcr.io/faasm/cpython:0.4.0 + image: ghcr.io/faasm/cpython:0.5.0 services: redis: image: redis diff --git a/Dockerfile b/Dockerfile index 45e8dde..e91f343 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,19 @@ -FROM ghcr.io/faasm/cpp-sysroot:0.4.0 +FROM ghcr.io/faasm/cpp-sysroot:0.8.0 ARG FAASM_PYTHON_VERSION SHELL ["/bin/bash", "-c"] ENV PYTHON_DOCKER="on" -RUN apt update && apt install -y libssl-dev +RUN apt update \ + && apt install -y --no-install-recommends \ + dpkg-dev \ + libssl-dev \ + pkg-config \ + wget \ + zlib1g \ + zlib1g-dev \ + && apt autoremove -y \ + && apt clean; rm -rf /var/lib/apt/lists/* # Clone code and submodules RUN mkdir -p /code \ @@ -30,21 +39,21 @@ RUN cd /code/python \ cpython.func # Build cross-compiled python modules, including `pyfaasm` -RUN cd /code/python \ - && ./bin/crossenv_setup.sh \ - && source ./cross_venv/bin/activate \ - && pip3 install -r crossenv/requirements.txt \ - && inv -r crossenv modules.build +# RUN cd /code/python \ + # && ./bin/crossenv_setup.sh \ + # && source ./cross_venv/bin/activate \ + # && pip3 install -r crossenv/requirements.txt \ + # && inv -r crossenv modules.build -# Finally, install the cross-compiled Python modules -RUN cd /code/python \ - && source ./venv/bin/activate \ - && inv modules.install +# # Finally, install the cross-compiled Python modules +# RUN cd /code/python \ + # && source ./venv/bin/activate \ + # && inv modules.install # TODO: Install experimental pacakges # RUN . ./cross_venv/bin/activate && inv libs.install --experimental WORKDIR /code/python -ENV TERM xterm-256color +ENV TERM=xterm-256color RUN sed -i 's/\/code\/cpp\/bin/\/code\/python\/bin/g' ~/.bashrc CMD ["/bin/bash", "-l"] diff --git a/VERSION b/VERSION index 1d0ba9e..8f0916f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.4.0 +0.5.0 diff --git a/pyfaasm/pyfaasm/core.py b/pyfaasm/pyfaasm/core.py index 8e4491a..5c3d59f 100644 --- a/pyfaasm/pyfaasm/core.py +++ b/pyfaasm/pyfaasm/core.py @@ -16,8 +16,6 @@ def get_env_bool(var_name): - global env_cache - if var_name not in env_cache: value = os.environ.get(var_name) env_cache[var_name] = bool(value) @@ -26,7 +24,6 @@ def get_env_bool(var_name): def set_env_bool(var_name, value): - global env_cache env_cache[var_name] = value @@ -76,7 +73,6 @@ def write_output(output): def get_output(): if is_local_output(): - global output_data return output_data else: raise RuntimeError( diff --git a/requirements.txt b/requirements.txt index dda3f9e..3bf94e7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ -black==22.3.0 -faasmctl==0.13.0 -flake8==3.9.2 +black>=23.12.0 +faasmctl>=0.51.0 +flake8>=7.0.0 invoke>=2.0.0 -numpy==1.22.0 requests>=2.31.0