Skip to content

Commit e2eb212

Browse files
huydhnfacebook-github-bot
authored andcommitted
Install flatbuffers from conda defaults (#22)
Summary: Per the discussion with cccclai, we need to have flatbuffers installed from conda to have the `flatc` executable. The current version (2.0.0) is newer than the required version used internally. Pull Request resolved: #22 Reviewed By: cccclai Differential Revision: D47768270 Pulled By: huydhn fbshipit-source-id: 6d60a6aa343b4d0529456d2576854891378eea12
1 parent bf4a17b commit e2eb212

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

.ci/docker/common/install_conda.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ install_miniconda() {
2727
install_python() {
2828
pushd /opt/conda
2929
# Install the correct Python version
30-
as_ci_user conda create -n "py_${PYTHON_VERSION}" -y python="${PYTHON_VERSION}"
30+
as_ci_user conda create -n "py_${PYTHON_VERSION}" -y --file /opt/conda/conda-env-ci.txt python="${PYTHON_VERSION}"
3131
popd
3232
}
3333

.ci/docker/conda-env-ci.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# TODO: We might need to update this to install flatbuffers from the pinned commit
2+
# in fbcode/executorch/third-party/flatbuffers.submodule.txt
3+
flatbuffers=2.0.0

.ci/docker/requirements-ci.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
flatbuffers==2.0
21
mpmath==1.3.0
32
PyYAML==6.0.1
43
ruamel.yaml==0.17.32

.ci/docker/ubuntu/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ ARG PYTHON_VERSION
2929
ENV PYTHON_VERSION=$PYTHON_VERSION
3030
ENV PATH /opt/conda/envs/py_$PYTHON_VERSION/bin:/opt/conda/bin:$PATH
3131
COPY requirements-ci.txt /opt/conda/
32+
COPY conda-env-ci.txt /opt/conda/
3233
COPY ./common/install_conda.sh install_conda.sh
3334
COPY ./common/utils.sh utils.sh
34-
RUN bash ./install_conda.sh && rm install_conda.sh utils.sh /opt/conda/requirements-ci.txt
35+
RUN bash ./install_conda.sh && rm install_conda.sh utils.sh /opt/conda/requirements-ci.txt /opt/conda/conda-env-ci.txt
3536

3637
USER ci-user
3738
CMD ["bash"]

0 commit comments

Comments
 (0)