Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .app_env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REGISTRY=azimuth
REGISTRY=servicenowdocker
BACKEND_VERSION=latest
FRONTEND_VERSION=latest
DEVICE=cpu
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- added "Without Postprocessing" feature to enable/disable post processing feature on the data

### Changed
- Renamed our docker images to use `servicenowdocker` registry on Docker Hub.

### Deprecated/Breaking Changes

Expand Down
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REGISTRY = azimuth
REGISTRY = servicenowdocker
IMAGE = azimuth
TAG = latest
DEVICE = cpu
Expand Down Expand Up @@ -31,14 +31,14 @@ build_be:
docker build \
--build-arg DEVICE=$(DEVICE) \
--build-arg STAGE=$(STAGE) \
-t $(REGISTRY)/$(IMAGE)_$(DEVICE):$(TAG)$(TAG_EXT) \
-t $(REGISTRY)/$(IMAGE):$(TAG)_$(DEVICE)$(TAG_EXT) \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we don't tag any image with latest, right? Should we?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmm tensorflow assigns latest to their CPU version, should we?

https://hub.docker.com/r/tensorflow/tensorflow/tags

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So like latest and latest-gpu. That way if you forget to specify a tag you at least get something that works. On the other hand, making it explicit like you did prevents users thinking they are using GPU when they are not. I like both. You choose!

.

.PHONY: build_fe
build_fe:
docker build \
--target $(STAGE) \
-t $(REGISTRY)/$(IMAGE)_app:$(TAG)$(TAG_EXT) \
-t $(REGISTRY)/$(IMAGE)-app:$(TAG)$(TAG_EXT) \
webapp/.

.PHONY: compose
Expand All @@ -47,3 +47,8 @@ compose: build launch
.PHONY: launch
launch:
docker-compose -f docker-compose.yml $(COMPOSE_EXT) --env-file $(ENV_FILE) up

.PHONY: push
push:
docker push $(REGISTRY)/$(IMAGE):$(TAG)_$(DEVICE)$(TAG_EXT)
docker push $(REGISTRY)/$(IMAGE)-app:$(TAG)$(TAG_EXT)
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3.9"
services:
backend:
image: ${REGISTRY}/azimuth_${DEVICE}:${BACKEND_VERSION}
image: ${REGISTRY}/azimuth:${BACKEND_VERSION}_${DEVICE}
environment:
- "CFG_PATH=${CFG_PATH}"
- "SENTENCE_TRANSFORMERS_HOME=/azimuth_shr/sentence_transformers"
Expand All @@ -20,7 +20,7 @@ services:
extra_hosts:
- "host.docker.internal:host-gateway"
web:
image: "${REGISTRY}/azimuth_app:${FRONTEND_VERSION}"
image: "${REGISTRY}/azimuth-app:${FRONTEND_VERSION}"
command:
- node
- ./server.js
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Minimal makefile for Sphinx documentation
#
REGISTRY = azimuth
REGISTRY = servicenowdocker
IMAGE = azimuth_docs

# Put it first so that "make" without argument is like "make help".
Expand Down
4 changes: 2 additions & 2 deletions makefiles/Makefile.test
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ check-changes:

.PHONY: image.testbackend
image.testbackend:
docker run --rm -t $(REGISTRY)/$(IMAGE)_$(DEVICE):$(TAG)$(TAG_EXT) make test
docker run --rm -t $(REGISTRY)/$(IMAGE):$(TAG)_$(DEVICE)$(TAG_EXT) make test

.PHONY: image.testfrontend
image.testfrontend:
docker run --rm \
-t ${REGISTRY}/azimuth_app:$(TAG)$(TAG_EXT) \
-t ${REGISTRY}/azimuth-app:$(TAG)$(TAG_EXT) \
make test