File tree Expand file tree Collapse file tree 4 files changed +12
-17
lines changed Expand file tree Collapse file tree 4 files changed +12
-17
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,11 @@ OS=ubuntu
16
16
OS_VERSION=22.04
17
17
CLANG_VERSION=12
18
18
PYTHON_VERSION=3.10
19
- MINICONDA_VERSION=' 23.5.1-0'
19
+ MINICONDA_VERSION=23.5.1-0
20
+
21
+ # TODO: Pin PyTorch version for now until we have the CI in place to update this
22
+ # safely
23
+ TORCH_VERSION=2.1.0.dev20230731
20
24
21
25
docker build \
22
26
--no-cache \
@@ -25,6 +29,7 @@ docker build \
25
29
--build-arg " CLANG_VERSION=${CLANG_VERSION} " \
26
30
--build-arg " PYTHON_VERSION=${PYTHON_VERSION} " \
27
31
--build-arg " MINICONDA_VERSION=${MINICONDA_VERSION} " \
32
+ --build-arg " TORCH_VERSION=${TORCH_VERSION} " \
28
33
-f " ${OS} " /Dockerfile \
29
34
" $@ " \
30
35
.
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ install_pip_dependencies() {
40
40
pushd /opt/conda
41
41
# Install all Python dependencies, including PyTorch
42
42
pip_install -r /opt/conda/requirements-ci.txt
43
- pip_install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
43
+ pip_install --pre torch== " ${TORCH_VERSION} " --index-url https://download.pytorch.org/whl/nightly/cpu
44
44
popd
45
45
}
46
46
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ RUN bash ./install_user.sh && rm install_user.sh
26
26
# Install conda and other dependencies
27
27
ARG MINICONDA_VERSION
28
28
ARG PYTHON_VERSION
29
+ ARG TORCH_VERSION
29
30
ENV PYTHON_VERSION=$PYTHON_VERSION
30
31
ENV PATH /opt/conda/envs/py_$PYTHON_VERSION/bin:/opt/conda/bin:$PATH
31
32
COPY requirements-ci.txt /opt/conda/
Original file line number Diff line number Diff line change @@ -22,30 +22,19 @@ jobs:
22
22
submodules : ' true'
23
23
ref : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
24
24
script : |
25
- WORKSPACE=$(pwd)
25
+ PYTHON_VERSION=3.10
26
+ # TODO: Figure out why /opt/conda/envs/py_$PYTHON_VERSION/bin is not in the path
27
+ # here, as it's there in the container
28
+ export PATH="/opt/conda/envs/py_${PYTHON_VERSION}/bin:${PATH}"
26
29
27
- pushd "${HOME}"
28
- # Create the softlink to the workspace as install.sh requires to run from its parent directory
29
- ln -s "${WORKSPACE}" executorch
30
- # Install executorch
31
- pushd executorch
32
-
33
-
34
- # Install nightly pytorch
35
- pip3 install --pre torch -i https://download.pytorch.org/whl/nightly/cpu
36
30
# Install executorch
37
31
pip3 install .
38
-
39
32
# Just print out the list of packages for debugging
40
33
pip3 list
41
34
42
35
# Build executorch runtime
43
36
buck2 build //examples/executor_runner:executor_runner
44
-
45
37
# Export a test model
46
38
python3 -m examples.export.export_example --model_name="linear"
47
-
48
39
# Run test model
49
40
buck2 run //examples/executor_runner:executor_runner -- --model_path ./linear.ff
50
-
51
- popd
You can’t perform that action at this time.
0 commit comments