-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #177 from ORNL/dev
Dev
- Loading branch information
Showing
21 changed files
with
207 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Tests inside a Container | ||
on: [pull_request] | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 40 | ||
if: "!contains(github.event.head_commit.message, 'CI Bot')" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Show OS Info | ||
run: '[[ "$OSTYPE" == "linux-gnu"* ]] && { echo "OS Type: Linux"; (command -v lsb_release &> /dev/null && lsb_release -a) || cat /etc/os-release; uname -r; } || [[ "$OSTYPE" == "darwin"* ]] && { echo "OS Type: macOS"; sw_vers; uname -r; } || echo "Unsupported OS type: $OSTYPE"' | ||
|
||
- name: Build Flowcept's image | ||
run: make build | ||
|
||
- name: Start dependent services (Mongo and Redis) | ||
run: make services | ||
|
||
- name: Run tests in container | ||
run: make tests-in-container |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Use the command `make build` to build this image. | ||
FROM miniconda:local | ||
|
||
# Install vim | ||
RUN apt-get update && \ | ||
apt-get install -y vim curl wget make \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /flowcept | ||
|
||
COPY pyproject.toml Makefile README.md ./ | ||
COPY src ./src | ||
COPY resources ./resources | ||
COPY notebooks ./notebooks | ||
COPY tests ./tests | ||
COPY examples ./examples | ||
|
||
RUN export FLOWCEPT_SETTINGS_PATH=$(realpath resources/sample_settings.yaml) \ | ||
&& echo "export FLOWCEPT_SETTINGS_PATH=$FLOWCEPT_SETTINGS_PATH" >> ~/.bashrc | ||
|
||
RUN conda create -n flowcept python=3.11.10 -y \ | ||
&& echo "conda activate flowcept" >> ~/.bashrc | ||
|
||
RUN conda run -n flowcept pip install -e .[all] # This is an overkill and will install many things you might not need. Please modify deployment/Dockerfile in case you do not need to install "all" dependencies. | ||
|
||
# Default command | ||
CMD ["bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
|
||
if [ ! -d "src" ]; then | ||
echo "Error: 'src' directory does not exist in the current path. Please run it from the project root." | ||
exit 1 | ||
fi | ||
|
||
# Download the Miniconda Dockerfile | ||
echo "Downloading Miniconda Dockerfile..." | ||
curl --silent -o Dockerfile_miniconda https://raw.githubusercontent.com/anaconda/docker-images/refs/heads/main/miniconda3/debian/Dockerfile | ||
cat Dockerfile_miniconda | ||
|
||
# Build the Miniconda image locally | ||
echo "Building miniconda:local image..." | ||
docker build -t miniconda:local -f Dockerfile_miniconda . | ||
rm Dockerfile_miniconda | ||
|
||
# Check if the Miniconda build failed | ||
if [ $? -ne 0 ]; then | ||
echo "Error: Miniconda image build failed." | ||
exit 1 | ||
fi | ||
|
||
echo "Miniconda image built successfully." | ||
# Step 4: Build the flowcept image with both 'latest' and versioned tags | ||
echo "Building flowcept image with latest and version tags..." | ||
docker build -t flowcept:latest -f deployment/Dockerfile . | ||
|
||
# Check if the flowcept build succeeded | ||
if [ $? -eq 0 ]; then | ||
echo "Flowcept image built successfully with tags 'latest'." | ||
echo "You can now run it using $> make run" | ||
else | ||
echo "Failed to build flowcept image." | ||
exit 1 | ||
fi | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.