diff --git a/.docker/setup_config.sh b/.docker/setup_config.sh index 1f7e30857..e8d04e8c6 100644 --- a/.docker/setup_config.sh +++ b/.docker/setup_config.sh @@ -1,6 +1,15 @@ set -e echo "About to start conda update, this may take some time..." -source setup/setup_conda.sh Linux-x86_64 +ARCH=$(uname -m) +if [ "$ARCH" == "x86_64" ]; then + source setup/setup_conda.sh Linux-x86_64 +elif [ "$ARCH" == "aarch64" ]; then + source setup/setup_conda.sh Linux-aarch64 +else + echo "Unsupported architecture: $ARCH" + exit 1 +fi + # now install the emission environment source setup/setup.sh @@ -54,4 +63,4 @@ else NEW="run(reloader=True,host=server_host" echo "Replacing $ORIG -> $NEW" sed -i -e "s|$ORIG|$NEW|g" emission/net/api/cfc_webapp.py -fi +fi \ No newline at end of file diff --git a/.github/workflows/dockerbuild.yml b/.github/workflows/dockerbuild.yml new file mode 100644 index 000000000..a3cdf53cc --- /dev/null +++ b/.github/workflows/dockerbuild.yml @@ -0,0 +1,60 @@ +name: docker-build + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + branches: + - master + - gis-based-mode-detection + pull_request: + branches: + - master + - gis-based-mode-detection + schedule: + # * is a special character in YAML so you have to quote this string + - cron: '5 4 * * 0' + + +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + include: + - os: macos-latest + PLATFORM: MacOSX-x86_64 + - os: ubuntu-latest + PLATFORM: Linux-x86_64 + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - name: check my platform + shell: bash -l {0} + run: | + uname -a + uname -m + + - name: Setup docker, docker-compose, and colima (missing on MacOS) + if: runner.os == 'macos' + run: | + brew install docker docker-compose colima + + # Link the Docker Compose v2 plugin so it's understood by the docker CLI + mkdir -p ~/.docker/cli-plugins + ln -sfn /usr/local/opt/docker-compose/bin/docker-compose ~/.docker/cli-plugins/docker-compose + + LIMACTL_PATH=$(brew --prefix)/bin/limactl + sudo curl -L -o $LIMACTL_PATH https://github.com/mikekazakov/lima-nohvf/raw/master/limactl && sudo chmod +x $LIMACTL_PATH + colima start --network-address --arch arm64 --vm-type=qemu + + - name: try doing docker build + shell: bash -l {0} + run: | + docker build -t emission-server . \ No newline at end of file diff --git a/.github/workflows/osx-ubuntu-manual-install.yml b/.github/workflows/osx-ubuntu-manual-install.yml index e6ecf0ddc..6a5592cdb 100644 --- a/.github/workflows/osx-ubuntu-manual-install.yml +++ b/.github/workflows/osx-ubuntu-manual-install.yml @@ -35,6 +35,12 @@ jobs: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 + - name: check my platform + shell: bash -l {0} + run: | + uname -a + uname -m + - name: Install miniconda shell: bash -l {0} run: | diff --git a/README.md b/README.md index b82b3728d..41247a7b2 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,12 @@ preprocessing results ensures reasonable performance. ## Installation: ## ---------- -- For **deployers** (i.e. if you want to primarily *use* the system as opposed to modify/develop it, the [docker installation](https://github.com/e-mission/e-mission-docker) is probably the easiest way to get started. +- For **deployers** i.e. if you want to primarily *use* the system as opposed to modify/develop it, + +```bash +docker build -t e-mission-server . +``` + - For **builders** (i.e. if you want to write new scripts or modify existing scripts) the [manual install](https://github.com/e-mission/e-mission-docs/blob/master/docs/install/manual_install.md) will make it easier to edit files directly on your local filesystem. Make sure to use a POSIX-compliant CLI; you may want to look into [gitbash](https://openhatch.org/missions/windows-setup/install-git-bash) or similar on Windows. ## Additional Documentation: ##