FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python/Dockerfile at bump-cpp · faasm/python · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
faasm
/
python
Public
Notifications
You must be signed in to change notification settings
Fork
3
Star
6
Code
Issues
1
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
python
/
Dockerfile
Copy path
More file actions
More file actions
Latest commit
History
History
History
55 lines (45 loc) · 1.66 KB
Breadcrumbs
python
/
Dockerfile
Copy path
File metadata and controls
55 lines (45 loc) · 1.66 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
FROM
faasm.azurecr.io/cpp-sysroot:0.2.5
ARG
FAASM_PYTHON_VERSION
SHELL
[
"/bin/bash"
,
"-c"
]
ENV
PYTHON_DOCKER=
"on"
RUN
apt update && apt install -y libssl-dev
#
Clone code and submodules
RUN
mkdir -p /code \
&& git clone \
-b v${FAASM_PYTHON_VERSION} \
https://github.com/faasm/python \
/code/python \
&& cd /code/python \
&& git submodule update --init -f third-party/cpp \
&& git submodule update --init -f third-party/cpython \
&& git submodule update --init -f third-party/crossenv \
&& git config --global --add safe.directory /code/python
#
Cross-compile CPython to WASM and the python libraries
RUN
cd /code/python \
&& ./bin/create_venv.sh \
&& source ./venv/bin/activate \
#
Buld and install a native CPython and a cross-compiled CPython with the
#
same version. Also cross-compile the entrypoint function for CPython
&& inv \
cpython.native \
cpython.wasm \
cpython.func
#
Build cross-compiled python modules, including `pyfaasm`
RUN
cd /code/python \
&& ./bin/crossenv_setup.sh \
&& source ./cross_venv/bin/activate \
&& pip3 install -r crossenv/requirements.txt \
&& inv -r crossenv modules.build
#
Finally, install the cross-compiled Python modules
RUN
cd /code/python \
&& source ./venv/bin/activate \
&& inv modules.install
#
TODO: enable these once the MXNet/ Horovod work is completed
#
Build mxnet
#
RUN inv mxnet
#
TODO: Install experimental pacakges
#
RUN . ./cross_venv/bin/activate && inv libs.install --experimental
WORKDIR
/code/python
ENV
TERM xterm-256color
RUN
sed -i
's/
\/
code
\/
cpp
\/
bin/
\/
code
\/
python
\/
bin/g'
~/.bashrc
CMD
[
"/bin/bash"
,
"-l"
]
Back
|
FazBrowse Home
|
New Git URL