Skip to content

Commit

Permalink
Merge pull request #9 from coltonbh/feature-c-force-root-in-container
Browse files Browse the repository at this point in the history
  • Loading branch information
coltonbh authored Jun 21, 2022
2 parents 18cd10a + 2906580 commit 32543bc
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 10 deletions.
1 change: 0 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
env:
BIGQC_BROKER_URL: amqp://broker
BIGQC_BACKEND_URL: redis://backend/0
C_FORCE_ROOT: true # to run celery as root with pickle serializer

steps:
- uses: actions/checkout@v3
Expand Down
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [unreleased]

## [0.1.3]

### Added

- `C_FORCE_ROOT=true` environment variable to the worker image so the variable doesn't have to be passed to a container at instantiation.
- Added `:latest` tag to `build_worker.sh` script.
- Added `push_worker.sh` scripts so I don't forget to push the tag and the image as the `latest` tag to the docker repo.

## [0.1.2]

### Changed
Expand Down Expand Up @@ -34,7 +42,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

- Initial release of core BigQC feature set. Tasks for `compute` (single point energy, gradient, hessian, and properties calculations) and `compute_procedure` (geometry optimization routine). Algorithms for distributed hessian and normal mode analysis with their associated tasks.

[unreleased]: https://github.com/coltonbh/bigqc/compare/0.1.2...HEAD
[unreleased]: https://github.com/coltonbh/bigqc/compare/0.1.3...HEAD
[0.1.3]: https://github.com/coltonbh/bigqc/releases/tag/0.1.3
[0.1.2]: https://github.com/coltonbh/bigqc/releases/tag/0.1.2
[0.1.1]: https://github.com/coltonbh/bigqc/releases/tag/0.1.1
[0.1.0]: https://github.com/coltonbh/bigqc/releases/tag/0.1.0
1 change: 0 additions & 1 deletion bigqc/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
__version__ = "0.1.2"
1 change: 0 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ services:
environment:
- bigqc_broker_url=amqp://broker
- bigqc_backend_url=redis://backend/0
- C_FORCE_ROOT=true # to run celery as root with pickle serializer; OK since in container
# Set concurrency to fix number of worker processes
# - bigqc_worker_concurrency=1
volumes:
Expand Down
2 changes: 0 additions & 2 deletions docker/docker-compose.xstream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ x-default-worker: &default-worker
environment:
- TERACHEM_PBS_HOST={{.Node.Hostname}}-terachem-{{.Task.Slot}}
- TERACHEM_FE_HOST={{.Node.Hostname}}-terachem-frontend
- C_FORCE_ROOT=true # to run celery as root with pickle serializer
volumes:
# qcengine uses /tmp by default for scratch directory
- scratch:/tmp
Expand All @@ -32,7 +31,6 @@ services:
# here overrides all values set in *default-worker, even if not defined twice
- TERACHEM_PBS_HOST={{.Node.Hostname}}-terachem-0
- TERACHEM_FE_HOST={{.Node.Hostname}}-terachem-frontend
- C_FORCE_ROOT=true
deploy:
mode: global

Expand Down
8 changes: 6 additions & 2 deletions docker/worker.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ ENV PYTHONUNBUFFERED=1 \
PIP_DEFAULT_TIMEOUT=100 \
POETRY_VERSION=1.1.13 \
# Install to system python, no need for venv
POETRY_VIRTUALENVS_CREATE=false
POETRY_VIRTUALENVS_CREATE=false \
# To run celery as root with pickle serializer; OK since in container
C_FORCE_ROOT=true

# Install QC packages
RUN conda install psi4=1.5 \
RUN conda install \
# https://github.com/psi4/psi4/issues/2596
psi4=1.5 \
libint2=*=hc9558a2_9 \
pytest=5 \
pcmsolver=*=py39h6d17ec8_2 \
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "bigqc"
version = "0.1.2"
version = "0.1.3"
description = "A distributed system for scaling and parallelizing quantum chemistry calculations"
authors = ["Colton Hicks <[email protected]>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_worker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

set -xe

docker build -t coltonbh/bigqc-worker:$(poetry version -s) -f docker/worker.dockerfile .
docker build -t coltonbh/bigqc-worker:$(poetry version -s) -t coltonbh/bigqc-worker:latest -f docker/worker.dockerfile .
6 changes: 6 additions & 0 deletions scripts/push_worker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

set -xe

docker push coltonbh/bigqc-worker:$(poetry version -s)
docker push coltonbh/bigqc-worker:latest

0 comments on commit 32543bc

Please sign in to comment.