Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI][Contrib] Add Vitis-AI docker installation #6342

Merged
merged 4 commits into from
Sep 3, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docker/Dockerfile.ci_cpu
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,7 @@ RUN bash /install/ubuntu_install_caffe.sh
# Github Arm(R) Ethos(TM)-N NPU driver
COPY install/ubuntu_install_ethosn_driver_stack.sh /install/ubuntu_install_ethosn_driver_stack.sh
RUN bash /install/ubuntu_install_ethosn_driver_stack.sh

# Vitis-AI PyXIR CI deps
COPY install/ubuntu_install_vai_packages.sh /install/ubuntu_install_vai_packages.sh
RUN bash /install/ubuntu_install_vai_packages.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: maybe ubuntu_install_vitis_ai.sh would be more descriptive?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@leandron Yes, we will make it more descriptive. However, in the main Vitis-AI integration PR we add another script so it wouldn't be too clear if we call this ubuntu_install_vitis_ai.sh. Also, as this script is only used for CI I think ubuntu_install_vitis_ai_packages_ci.sh would be better. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi could you explain the purpose of docker related files/scripts in the main integration PR? Ideally we should separate all environment related changes to this PR so that we could see the whole picture.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@comaniac The purpose of docker related files/scripts in the main integration PR is to build the docker image for Vitis-AI codegen infrastructure using Dockerfile.ci_vai and launching the docker container with necessary drivers if required. Should we add those files in this PR itself?

Copy link
Contributor

@leandron leandron Aug 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, as this script is only used for CI I think ubuntu_install_vitis_ai_packages_ci.sh would be better. What do you think?

I had a look on your other PR now, and I understand what you said about the other script. I think it would be beneficial to have all the CI change in one patch, if possible.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@leandron I am not sure about the clarity of the demo prefix either. Maybe we can just add it as Dockerfile.vitisai? @tqchen ?

And ok, we will move all environment changes to this PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with Leandro basically. In TVM we have two types of docker files: CI and Demo. Demo is used to provide an environment for users to quickly try out basic TVM functions. However, TVM does not provide the docker file for developments other than CI environment.

If you would like to provide an environment for TVM users that want to use Vitis-AI, the currently solution is either providing installation instructions in the tutorial or document like ACL does to help users set up the environment, or make it as a Demo image and point users to there.

Of course, ideally it would be better for TVM to have a set of docker files for developments, but it is hard to achieve for some backends due to the license issue.

cc @tqchen for more comments.

Copy link
Contributor Author

@anilmartha anilmartha Aug 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@comaniac @leandron
I have added Dockerfile.demo_vitis_ai and corresponding environment related scripts. Could you please review those?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM @leandron lemme know if you're happy with the outcome of the file renaming.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @tmoreau89 - yes, it looks more integrated with existing Dockerfiles now. LGTM

29 changes: 29 additions & 0 deletions docker/install/ubuntu_install_vai_packages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

set -e
set -u
set -o pipefail

export PYXIR_HOME=/opt/pyxir
mkdir /opt/pyxir
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:as you have it already defined, maybe mkdir "$PYXIR_HOME" is better.


pip3 install progressbar

git clone --recursive --branch v0.1.2 https://github.com/Xilinx/pyxir.git "${PYXIR_HOME}"
cd "${PYXIR_HOME}" && python3 setup.py install