Skip to content

Commit

Permalink
add generic python example
Browse files Browse the repository at this point in the history
  • Loading branch information
rkm committed Dec 9, 2024
1 parent 52cb6d0 commit b615096
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
9 changes: 9 additions & 0 deletions python-generic/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM docker.io/python:3.12.8-bullseye@sha256:37813bbaee14c6653f32a33a2a3e5b331c4000557f7c785cccf29d2df8e0e041 AS base

USER root
RUN mkdir /safe_data /safe_outputs /scratch

RUN pip install --user numpy
ADD --chmod=0755 hello-world.py /bin

ENTRYPOINT ["/bin/hello-world.py"]
11 changes: 11 additions & 0 deletions python-generic/hello-world.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env python3

import numpy as np

def main() -> int:
x = np.array([[1, 2, 3], [4, 5, 6]])
print(x)
return 0

if __name__ == '__main__':
raise SystemExit(main())

0 comments on commit b615096

Please sign in to comment.