Skip to content

Commit

Permalink
Add testing files for CI system with local docker (See Iain).
Browse files Browse the repository at this point in the history
  • Loading branch information
Iainmon committed Feb 1, 2025
1 parent d8e9c69 commit 103923a
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docker/chapel-pytorch-test/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM chapel/chapel

# Install pytorch
RUN pip3 install torch

# RUN echo "Hello!"
# RUN echo $(which chpl)

# ADD ./script.sh ./script.sh

WORKDIR /app

COPY ./script.sh script.sh
COPY . ../../.
RUN sh script.sh

# CMD ["sh","script.sh"] # Turn off when testing.
8 changes: 8 additions & 0 deletions docker/chapel-pytorch-test/build-run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

docker build --tag 'chapel_pytorch_test' .
docker run -a STDOUT -a STDERR 'chapel_pytorch_test'

# terminal cmd: sh build-run.sh && docker run -it 'chapel_pytorch_test'
# when testing and output of Dockerfile could be unreliable. Having
# this allows you to see the environment produced by the Dockerfile!
7 changes: 7 additions & 0 deletions docker/chapel-pytorch-test/script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

echo "Hello!"

echo $(which chpl)

echo $(which python3 || echo "No 'python3' found!")

0 comments on commit 103923a

Please sign in to comment.