Skip to content

Commit 2c95a0d

Browse files
committed
Add missing files
1 parent fb0e2a3 commit 2c95a0d

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,9 @@ RUN pip install --no-cache-dir -r requirements-deploy.txt
1515

1616
RUN pip install --no-cache-dir py-ard==$PY_ARD_VERSION
1717

18-
RUN pyard-import && \
19-
pyard --version && \
20-
pyard-status
21-
2218
COPY app.py /app/
2319
COPY api.py /app/
2420
COPY api-spec.yaml /app/
2521

26-
CMD ["gunicorn", "--bind", "0.0.0.0:8080", "--worker-tmp-dir", "/dev/shm", "--timeout", "30", "app:app"]
22+
COPY docker-entrypoint-flask.sh /usr/local/bin/
23+
CMD ["/usr/local/bin/docker-entrypoint-flask.sh"]

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
PROJECT_NAME := $(shell basename `pwd`)
22
PACKAGE_NAME := pyard
3+
PYARD_VERSION := 1.2.1
34

45
.PHONY: clean clean-test clean-pyc clean-build docs help
56
.DEFAULT_GOAL := help
@@ -98,10 +99,11 @@ dist: clean ## builds source and wheel package
9899
ls -l dist
99100

100101
docker-build: ## build a docker image for the service
101-
docker build --platform=linux/amd64 -t nmdpbioinformatics/pyard-service:latest .
102+
docker build --platform=linux/amd64 -t nmdpbioinformatics/pyard-service:$(PYARD_VERSION).linux-amd64 .
103+
docker tag nmdpbioinformatics/pyard-service:$(PYARD_VERSION) nmdpbioinformatics/pyard-service:latest
102104

103105
docker: docker-build ## build a docker image and run the service
104-
docker run --platform=linux/amd64 --rm --name pyard-service -p 8080:8080 nmdpbioinformatics/pyard-service:latest
106+
docker run --platform=linux/amd64 --rm --name pyard-service -p 8080:8080 nmdpbioinformatics/pyard-service:$(PYARD_VERSION).linux-amd64
105107

106108
install: clean ## install the package to the active Python's site-packages
107109
pip install --upgrade pip

docker-entrypoint-flask.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ set -e
44
# A positive integer generally in the 2-4 x $(NUM_CORES) range.
55
WORKER_PROCESSES=${WORKERS:-4}
66

7-
echo "Starting Magenta with" "${WORKER_PROCESSES}" worker processes.
7+
echo "Starting py-ard service with" "${WORKER_PROCESSES}" worker processes.
88

99
if [ "${WORKER_PROCESSES}" != "1" ]; then
1010
WORKER_FLAG="--workers=${WORKER_PROCESSES}"
1111
fi
1212

13-
# Import pyard before starting the app
13+
# Import the latest pyard before starting the app
1414
pyard-import
1515

1616
gunicorn --preload --bind 0.0.0.0:8080 --timeout 5000 --log-level info "${WORKER_FLAG}" app:app

0 commit comments

Comments
 (0)