File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ -m
2+ scrapscript
3+ ...
Original file line number Diff line number Diff line change @@ -7,15 +7,17 @@ WORKDIR cosmo
77RUN unzip ../$COSMO bin/ape.elf bin/assimilate bin/bash bin/python bin/zip
88RUN mkdir Lib
99COPY scrapscript.py Lib
10+ COPY .args .
1011RUN bin/ape.elf bin/python -m compileall Lib
1112RUN mv Lib/__pycache__/scrapscript*.pyc Lib/scrapscript.pyc
1213RUN rm Lib/scrapscript.py
13- RUN sh bin/zip -A -r bin/python Lib
14- RUN bin/ape.elf bin/assimilate bin/python
14+ RUN cp bin/python bin/scrapscript.com
15+ RUN sh bin/zip -A -r bin/scrapscript.com Lib .args
16+ RUN bin/ape.elf bin/assimilate bin/scrapscript.com
1517
1618# Set up the container
1719FROM scratch
18- COPY --from=build /cosmo/bin/python .
20+ COPY --from=build /cosmo/bin/scrapscript.com .
1921EXPOSE 8000
20- ENTRYPOINT ["./python" , "-m" , " scrapscript" ]
22+ ENTRYPOINT ["./scrapscript.com " ]
2123CMD ["repl" ]
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ set -eux
3+ PREV=" $( pwd) "
4+ DIR=" $( mktemp -d) "
5+ cp scrapscript.py " $DIR "
6+ cp .args " $DIR "
7+ cd " $DIR "
8+ wget https://cosmo.zip/pub/cosmos/bin/python
9+ wget https://cosmo.zip/pub/cosmos/bin/zip
10+ chmod +x python
11+ chmod +x zip
12+ ./python -m compileall scrapscript.py
13+ mkdir Lib
14+ cp __pycache__/scrapscript.cpython-311.pyc Lib/scrapscript.pyc
15+ cp python scrapscript.com
16+ ./zip -r scrapscript.com Lib .args
17+ echo " Testing..."
18+ ./scrapscript.com apply " 1+2"
19+ cd " $PREV "
20+ cp " $DIR " /scrapscript.com .
You can’t perform that action at this time.
0 commit comments