-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake_docker.sh
More file actions
executable file
·32 lines (27 loc) · 1.1 KB
/
make_docker.sh
File metadata and controls
executable file
·32 lines (27 loc) · 1.1 KB
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
29
30
31
32
#!/usr/bin/env bash
# Creates all requisite Docker images and runs tests for the package
# Customize for your package by adding to PREQUISITE_IMAGES as needed
# Will create all Docker images with the latest tag
# Set the package name from the directory of this file
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
PACKAGE_NAME=$(basename "$SCRIPT_DIR")
# Build prerequisite Docker images if needed (for private dependencies)
PREREQUISITE_IMAGES=("csi_utils")
for IMAGE in "${PREREQUISITE_IMAGES[@]}"; do
# Run their make_docker.sh scripts, assuming that they're in the same directory
bash "$SCRIPT_DIR"/../"$IMAGE"/make_docker.sh
done
# Build the Docker image
docker build -t "$PACKAGE_NAME":latest "$SCRIPT_DIR"
# Run the Docker container, install requirements.txt, and run pytest
#docker run \
# -it --rm \
# -v /mnt/HDSCA_Development:/mnt/HDSCA_Development \
# -v /mnt/csidata:/mnt/csidata \
# --entrypoint="" \
# "$PACKAGE_NAME":latest \
# /bin/bash -c \
# "pip install -r requirements.txt &&
# pip uninstall -y opencv-python &&
# pip install opencv-python-headless &&
# pytest"