Skip to content

Commit

Permalink
Update Python versions and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
marccocorico committed Mar 4, 2024
1 parent b884a00 commit a0740f9
Show file tree
Hide file tree
Showing 12 changed files with 75 additions and 67 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ on:
workflow_dispatch:
jobs:
build-docs:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Git checkout
uses: actions/checkout@v2

- name: Setup Python env
uses: actions/setup-python@v2
with:
python-version: "3.9"
python-version: "3.11"

- name: Install Poetry
run: |
pip install poetry==1.5.1
pip install poetry==1.*
poetry config virtualenvs.create false
- name: Install autodisc-server-libs dependencies
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ For development work on the Python libraries, we recommend starting a new conda
environment with

```bash
conda create -n adtool python=3.9 poetry=1.5.1
conda create -n adtool python=3.11 poetry=1.* -y
```

or, if you are running on the new Macbooks with M1 processors

```bash
CONDA_SUBDIR=osx-64 conda create -n adtool python=3.9 poetry=1.5.1
CONDA_SUBDIR=osx-64 conda create -n adtool python=3.11 poetry=1.* -y
```

Please see the online documentation at https://developmentalsystems.org/adtool/.
Expand Down
2 changes: 1 addition & 1 deletion configs/remote_experiments/additional_files/jeanzay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sbatch <<EOT
#SBATCH --array=0-$(($1-1))
module purge
module load python/3.7.3
module load python/3.11
conda activate autoDiscTool
srun python auto_disc/auto_disc/run.py --seed \$SLURM_ARRAY_TASK_ID ${@:2}
Expand Down
12 changes: 6 additions & 6 deletions services/base/AutoDiscServer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
FROM --platform=linux/amd64 nvidia/cuda:12.1.1-base-ubuntu20.04 as library
FROM --platform=linux/amd64 nvidia/cuda:12.3.2-base-ubuntu22.04 as library

# install pip and virtualenv for the system python environment (python3.8)
ENV DEBIAN_FRONTEND="noninteractive"
# TODO: load tz dynamically, would also fix the issue #210
ENV TZ="Etc/UTC"
RUN apt-get update -y && apt-get install -y python3-pip virtualenv python-is-python3

# bootstrap a virtual env in python3.9 for poetry
RUN apt-get install -y python3.9
# bootstrap a virtual env in python3.11 for poetry
RUN apt-get install -y python3.11
ENV POETRY_HOME=/opt/poetry
ENV VIRTUAL_ENV=$POETRY_HOME
RUN virtualenv -p /usr/bin/python3.9 $VIRTUAL_ENV
RUN virtualenv -p /usr/bin/python3.11 $VIRTUAL_ENV
# activate virtual environment and install poetry
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN pip install poetry==1.5.1
RUN pip install poetry==1.*

# create and activate the autodisc-env virtualenv for the server
ENV VIRTUAL_ENV=/autodisc-env
RUN virtualenv -p /usr/bin/python3.9 /autodisc-env
RUN virtualenv -p /usr/bin/python3.11 /autodisc-env
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
# at this point, the $PATH prefers /autodisc-env, then /opt/poetry, then system

Expand Down
12 changes: 6 additions & 6 deletions services/base/AutoDiscServer/flask_app/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
flask==2.1.2
flask-cors==3.0.10
pyyaml==6.0
pexpect==4.8.0
addict==2.4.0
gunicorn==20.1.0
flask==3
flask-cors==4
pyyaml==6
pexpect==4.8
addict==2.4
gunicorn==21
2 changes: 1 addition & 1 deletion services/base/AutoDiscServer/libs/docs/README_INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ The software is implemented in various microservices
1. If you do not already have it, please install
[Conda](https://www.anaconda.com/)
2. Create _autoDiscTool_ conda environment: `conda env create --name
autoDiscTool python=3.7 `
autoDiscTool python=3.11 `
3. Activate _autoDiscTool_ conda environment: `conda activate autoDiscTool`
4. Go to package: `cd libs/auto_disc`
5. Install package: `pip install -e .`
Expand Down
4 changes: 2 additions & 2 deletions services/base/AutoDiscServer/libs/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 13 additions & 12 deletions services/base/AutoDiscServer/libs/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = [ "poetry-core>=1.5.1",]
requires = [ "poetry-core>=1",]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
Expand All @@ -21,22 +21,23 @@ include = "adtool_default"
addict = "2.4.0"
filetype = "1.2.0"
graphviz = "0.20.1"
imageio = "2.28.0"
imageio-ffmpeg = "0.4.7"
matplotlib = "^3.7.1"
imageio = "2.34.0"
imageio-ffmpeg = "0.4.9"
matplotlib = "^3.8"
mergedeep = "1.3.4"
neat-python = "0.92"
numpy = "1.21.6"
numpy = "^1.26"
pexpect = "^4.8.0"
pillow = "9.2.0"
python = ">=3.9,<3.11"
requests = "2.28.1"
sqlalchemy = "2.0.3"
tinydb = "4.7.0"
pillow = "10.2.0"
python = ">=3.9,<3.13"
requests = "^2"
sqlalchemy = "^2.0"
tinydb = "4.8.0"
toml = "^0.10.2"
torch = "^1.7.1"
urllib3 = ">=1.21.1,<1.27"
watchdog = "^3.0.0"
urllib3 = "2.2.1"
watchdog = "^4.0.0"
Werkzeug= "^2.3"

[tool.poetry.group.test.dependencies]
coverage = "^7.2.7"
Expand Down
2 changes: 1 addition & 1 deletion services/base/ExpeDB/API/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8-slim
FROM python:3.11-slim

RUN apt-get update -y && apt-get install -y gcc

Expand Down
4 changes: 2 additions & 2 deletions services/base/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# docker-compose.yml
version: "3" # TODO
version: "3.7" # TODO
services:
##### FRONTEND APP #####
app:
Expand Down Expand Up @@ -86,7 +86,7 @@ services:
hostname: autodisc-server
platform: linux/amd64
build:
context: ./AutoDiscServer
context: ../base/AutoDiscServer
environment:
EXPEDB_CALLER_HOST: expe-db-api
EXPEDB_CALLER_PORT: 80
Expand Down
2 changes: 1 addition & 1 deletion services/dev/utils/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.7.14-slim
FROM python:3.11-slim

RUN apt-get update -y && apt-get install -y gcc

Expand Down
67 changes: 37 additions & 30 deletions services/prod/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,53 @@
# docker-compose.yml
version: "3"
version: "3.7"
services:
##### FRONTEND APP #####
app:
extends:
file: ../base/docker-compose.yml
service: app
# extends:
# file: ../base/docker-compose.yml
# service: app
# <<: *app
image: ${DOCKER_REGISTRY-adtool}/app:${RELEASE_TAG-latest}

##### GATEWAY #####
gateway:
extends:
file: ../base/docker-compose.yml
service: gateway
# extends:
# file: ../base/docker-compose.yml
# service: gateway
image: ${DOCKER_REGISTRY-adtool}/gateway:${RELEASE_TAG-latest}
##### APP DB #####
app-db:
extends:
file: ../base/docker-compose.yml
service: app-db
app-db-api:
extends:
file: ../base/docker-compose.yml
service: app-db-api
##### EXPE DB #####
expe-db:
extends:
file: ../base/docker-compose.yml
service: expe-db


# ##### APP DB #####
# app-db:
# extends:
# file: ../base/docker-compose.yml
# service: app-db
# app-db-api:
# extends:
# file: ../base/docker-compose.yml
# service: app-db-api
# ##### EXPE DB #####
# expe-db:
# extends:
# file: ../base/docker-compose.yml
# service: expe-db
expe-db-api:
extends:
file: ../base/docker-compose.yml
service: expe-db-api
# extends:
# file: ../base/docker-compose.yml
# service: expe-db-api
image: ${DOCKER_REGISTRY-adtool}/expe-db-api:${RELEASE_TAG-latest}

##### AUTODISC SERVER #####
autodisc-server:
extends:
file: ../base/docker-compose.yml
service: autodisc-server
# extends:
# file: ../base/docker-compose.yml
# service: autodisc-server
image: ${DOCKER_REGISTRY-adtool}/autodisc-server:${RELEASE_TAG-latest}

##### JUPYTER LAB #####
jupyter:
extends:
file: ../base/docker-compose.yml
service: jupyter
# extends:
# file: ../base/docker-compose.yml
# service: jupyter
image: ${DOCKER_REGISTRY-adtool}/jupyter:${RELEASE_TAG-latest}

0 comments on commit a0740f9

Please sign in to comment.