diff --git a/basic-worker/Dockerfile b/basic-worker/Dockerfile index f5d5a1a..6c4f3a6 100644 --- a/basic-worker/Dockerfile +++ b/basic-worker/Dockerfile @@ -1,10 +1,21 @@ -FROM continuumio/miniconda3:4.10.3 +FROM ubuntu:24.04 MAINTAINER Mingxun Wang "mwang87@gmail.com" -RUN apt-get update && apt-get install -y build-essential +RUN apt-get update && apt-get install -y build-essential libarchive-dev wget vim curl + +# Install Mamba +ENV CONDA_DIR /opt/conda +RUN wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh -O ~/miniforge.sh && /bin/bash ~/miniforge.sh -b -p /opt/conda +ENV PATH=$CONDA_DIR/bin:$PATH + +# Adding to bashrc +RUN echo "export PATH=$CONDA_DIR:$PATH" >> ~/.bashrc + +# Forcing version of Python +RUN mamba create -n python312 python=3.12 -y COPY requirements.txt . -RUN pip install -r requirements.txt +RUN /bin/bash -c 'source activate python312 && pip install -r requirements.txt' COPY . /app -WORKDIR /app +WORKDIR /app \ No newline at end of file diff --git a/basic-worker/docker-compose.yml b/basic-worker/docker-compose.yml index 6c1f766..dbf0eff 100644 --- a/basic-worker/docker-compose.yml +++ b/basic-worker/docker-compose.yml @@ -13,12 +13,17 @@ services: - default - nginx-net restart: unless-stopped - command: /app/run_server.sh + command: /bin/bash -c "source activate python312 && /app/run_server.sh" environment: - VIRTUAL_HOST: template.ucsd.edu + VIRTUAL_HOST: template.gnps2.org VIRTUAL_PORT: 5000 - LETSENCRYPT_HOST: template.ucsd.edu - LETSENCRYPT_EMAIL: miw023@ucsd.edu + LETSENCRYPT_HOST: template.gnps2.org + LETSENCRYPT_EMAIL: mingxun.wang@cs.ucr.eduu + logging: + driver: "json-file" + options: + max-size: "10m" + max-file: "3" template-worker: build: @@ -27,7 +32,7 @@ services: container_name: template-worker volumes: - ./logs:/app/logs:rw - command: /app/run_worker.sh + command: /bin/bash -c "source activate python312 && /app/run_worker.sh" restart: unless-stopped depends_on: - template-redis @@ -35,18 +40,34 @@ services: networks: - default - nginx-net + logging: + driver: "json-file" + options: + max-size: "10m" + max-file: "3" template-rabbitmq: container_name: template-rabbitmq image: rabbitmq networks: - default + logging: + driver: "json-file" + options: + max-size: "10m" + max-file: "3" + template-redis: container_name: template-redis image: redis networks: - default + logging: + driver: "json-file" + options: + max-size: "10m" + max-file: "3" networks: diff --git a/basic-worker/requirements.txt b/basic-worker/requirements.txt index 43d9c32..32f0f3f 100644 --- a/basic-worker/requirements.txt +++ b/basic-worker/requirements.txt @@ -1,6 +1,7 @@ Flask gunicorn plotly +numpy>=2.0 pandas requests tqdm @@ -12,5 +13,5 @@ dash-core-components dash-html-components dash-renderer dash-table -celery==5.0.5 +celery==5.5.3 celery_once==3.0.1 diff --git a/basic/Dockerfile b/basic/Dockerfile index ad03752..6c4f3a6 100644 --- a/basic/Dockerfile +++ b/basic/Dockerfile @@ -1,7 +1,7 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 MAINTAINER Mingxun Wang "mwang87@gmail.com" -RUN apt-get update && apt-get install -y build-essential libarchive-dev wget vim +RUN apt-get update && apt-get install -y build-essential libarchive-dev wget vim curl # Install Mamba ENV CONDA_DIR /opt/conda @@ -12,10 +12,10 @@ ENV PATH=$CONDA_DIR/bin:$PATH RUN echo "export PATH=$CONDA_DIR:$PATH" >> ~/.bashrc # Forcing version of Python -RUN mamba create -n python310 python=3.10 -y +RUN mamba create -n python312 python=3.12 -y COPY requirements.txt . -RUN /bin/bash -c 'source activate python310 && pip install -r requirements.txt' +RUN /bin/bash -c 'source activate python312 && pip install -r requirements.txt' COPY . /app -WORKDIR /app +WORKDIR /app \ No newline at end of file diff --git a/basic/docker-compose.yml b/basic/docker-compose.yml index cbeef8a..52e1d9d 100644 --- a/basic/docker-compose.yml +++ b/basic/docker-compose.yml @@ -13,7 +13,7 @@ services: - default - nginx-net restart: unless-stopped - command: /app/run_server.sh + command: /bin/bash -c "source activate python312 && /app/run_server.sh" environment: VIRTUAL_HOST: template.gnps2.org VIRTUAL_PORT: 5000 @@ -23,6 +23,11 @@ services: resources: limits: memory: 32GB + logging: + driver: "json-file" + options: + max-size: "10m" + max-file: "3" networks: nginx-net: diff --git a/basic/requirements.txt b/basic/requirements.txt index e33f0ae..b653575 100644 --- a/basic/requirements.txt +++ b/basic/requirements.txt @@ -1,6 +1,7 @@ Flask gunicorn plotly +numpy>=2.0 pandas requests tqdm diff --git a/multiple-page/Dockerfile b/multiple-page/Dockerfile index f5d5a1a..6c4f3a6 100644 --- a/multiple-page/Dockerfile +++ b/multiple-page/Dockerfile @@ -1,10 +1,21 @@ -FROM continuumio/miniconda3:4.10.3 +FROM ubuntu:24.04 MAINTAINER Mingxun Wang "mwang87@gmail.com" -RUN apt-get update && apt-get install -y build-essential +RUN apt-get update && apt-get install -y build-essential libarchive-dev wget vim curl + +# Install Mamba +ENV CONDA_DIR /opt/conda +RUN wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh -O ~/miniforge.sh && /bin/bash ~/miniforge.sh -b -p /opt/conda +ENV PATH=$CONDA_DIR/bin:$PATH + +# Adding to bashrc +RUN echo "export PATH=$CONDA_DIR:$PATH" >> ~/.bashrc + +# Forcing version of Python +RUN mamba create -n python312 python=3.12 -y COPY requirements.txt . -RUN pip install -r requirements.txt +RUN /bin/bash -c 'source activate python312 && pip install -r requirements.txt' COPY . /app -WORKDIR /app +WORKDIR /app \ No newline at end of file diff --git a/multiple-page/docker-compose.yml b/multiple-page/docker-compose.yml index 1295e87..19f1375 100644 --- a/multiple-page/docker-compose.yml +++ b/multiple-page/docker-compose.yml @@ -13,17 +13,21 @@ services: - default - nginx-net restart: unless-stopped - command: /app/run_server.sh + command: /bin/bash -c "source activate python312 && /app/run_server.sh" environment: - VIRTUAL_HOST: template.ucsd.edu + VIRTUAL_HOST: template.gnps2.org VIRTUAL_PORT: 5000 - LETSENCRYPT_HOST: template.ucsd.edu - LETSENCRYPT_EMAIL: miw023@ucsd.edu + LETSENCRYPT_HOST: template.gnps2.org + LETSENCRYPT_EMAIL: mingxun.wang@cs.ucr.edu deploy: resources: limits: memory: 8000M - + logging: + driver: "json-file" + options: + max-size: "10m" + max-file: "3" networks: nginx-net: diff --git a/multiple-page/requirements.txt b/multiple-page/requirements.txt index e33f0ae..b653575 100644 --- a/multiple-page/requirements.txt +++ b/multiple-page/requirements.txt @@ -1,6 +1,7 @@ Flask gunicorn plotly +numpy>=2.0 pandas requests tqdm