Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. ssh into your build environment (described earlier) and start a screen session.
  2. Clone the spack stack repo and release

    Code Block
    clone -b release/1.7.0 --recursive "https://github.com/climbfujiJCSDA/spack-stack.git" spack-stack-1.7.0


  3. Setup spack stack

    Code Block
    cd spack-stack-1.7.0
    source setup.sh


  4. Create the container:

    Code Block
    export DOCKER_ENV=clang-mpich
    export DOCKER_CTR_REPO=747101682576.dkr.ecr.us-east-2.amazonaws.com
    spack stack create ctr --container=docker-ubuntu-${DOCKER_ENV} \
        --specs=jedi-ci | tee log.create.docker-ubuntu-${DOCKER_ENV}-ci.001
    .    Configuring basic directory information ...
    .      ... script directory: /home/ubuntu/spack-stack/spack-stack-1.7.1/spack-ext/lib/jcsda-emc/spack-stack/stack
    .      ... base directory: /home/ubuntu/spack-stack/spack-stack-1.7.1/spack-ext/lib/jcsda-emc/spack-stack
    .      ... spack directory: /home/ubuntu/spack-stack/spack-stack-1.7.1/spack
    .    ==> Created container /home/ubuntu/spack-stack/spack-stack-1.7.1/envs/docker-ubuntu-clang-mpich


  5. Use spack to create the docker file and build with docker

    Code Block
    cd envs/docker-ubuntu-$DOCKER_ENV/
    spack containerize > Dockerfile
    docker build -t $DOCKER_CTR_REPO/jedi-${DOCKER_ENV}-dev:test . 2>&1 | tee logdocker.txt


  6. push the built image to ECR

    Code Block
    aws ecr get-login-password --profile=jcsda-usaf-aws-us-east-2 \
                               --region us-east-2 \
       | docker login --username AWS \
           --password-stdin $DOCKER_CTR_REPO
    
    docker push ${DOCKER_CTR_REPO}/jedi-${DOCKER_ENV}-dev:test


...