-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (20 loc) · 894 Bytes
/
Makefile
File metadata and controls
28 lines (20 loc) · 894 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Makefile for Docker-based openEO downScaleML setup
IMAGE_NAME := front # Change to 'new' if needed
TEST_FILE ?= /app/tests/
AWS_ENV_VARS := -e AWS_ACCESS_KEY_ID=$(AWS_ACCESS_KEY_ID) -e AWS_SECRET_ACCESS_KEY=$(AWS_SECRET_ACCESS_KEY)
VOLUME_MAP := -v $(PWD)/app/test_data:/app/test_data
.PHONY: build run test setup clean shell
## Build the Docker image
build:
docker build -t $(IMAGE_NAME) .
## Setup: build the image and run the tests
setup: build run
## Run a specific test (make test FILE=/app/tests/my_test.py)
run:
docker run -it $(AWS_ENV_VARS) $(VOLUME_MAP) $(IMAGE_NAME) pytest /app/tests/pytest_private_seas5.py -v -s
## Open an interactive shell with micromamba env activated
shell:
docker run -it $(AWS_ENV_VARS) $(VOLUME_MAP) $(IMAGE_NAME) bash
## Clean all containers based on the image
clean:
-docker ps -a -q --filter ancestor=$(IMAGE_NAME) | xargs -r docker rm -f