Skip to content

Conversation

@mshr-h
Copy link
Contributor

@mshr-h mshr-h commented Sep 21, 2021

This an update for #6023.

@fernchen @zhiics @tqchen @FrozenGene
Can you take a look at this PR, please? Thanks!

apt-get install -y --no-install-recommends libboost-filesystem-dev libboost-python-dev \
libboost-system-dev libboost-thread-dev libboost-regex-dev protobuf-compiler \
libprotobuf-dev libhdf5-serial-dev libopenblas-dev libgflags-dev libgoogle-glog-dev
rm -rf /var/lib/apt/lists/*
Copy link
Contributor

Choose a reason for hiding this comment

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

Why needs this command?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Those packages are the minimum requirement for building caffe from source.
So I put them.

Copy link
Contributor

Choose a reason for hiding this comment

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

the rm -rf /var/lib/apt/lists/* part seems a little weird. can you elaborate/link to these instructions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's just a best practice for Dockerfiles.
Best practices for writing Dockerfiles | Docker Documentation

It might be unnecessary for this script. I'll remove it.

Copy link
Contributor

Choose a reason for hiding this comment

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

ah, didn't know this but it definitely makes sense. it wasn't the convention we were using before, but we should adopt it. i've filed #9825 to track this.

@mshr-h
Copy link
Contributor Author

mshr-h commented Oct 26, 2021

Hi @leandron @areusch @jroesch @masahi , could you take a review for this PR?

@areusch areusch self-assigned this Nov 9, 2021
Copy link
Contributor

@areusch areusch left a comment

Choose a reason for hiding this comment

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

thanks @mshr-h, i'd also like @masahi to take a look

apt-get install -y --no-install-recommends libboost-filesystem-dev libboost-python-dev \
libboost-system-dev libboost-thread-dev libboost-regex-dev protobuf-compiler \
libprotobuf-dev libhdf5-serial-dev libopenblas-dev libgflags-dev libgoogle-glog-dev
rm -rf /var/lib/apt/lists/*
Copy link
Contributor

Choose a reason for hiding this comment

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

the rm -rf /var/lib/apt/lists/* part seems a little weird. can you elaborate/link to these instructions?


apt-get install caffe-cpu -y
# install python packages
pip install "numpy>=1.7.1"
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add these to python/gen_requirements.py? also, can you use just one pip command to do this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok.

mkdir /caffe_src/build && cd /caffe_src/build
cmake .. -DCMAKE_INSTALL_PREFIX=${CAFFE_HOME} -DCMAKE_BUILD_TYPE=Release -DCPU_ONLY=1 \
-Dpython_version=3 -DUSE_OPENCV=OFF -DUSE_LEVELDB=OFF -DUSE_LMDB=OFF -DBUILD_docs=OFF -DBLAS=open
make all -j`nproc`
Copy link
Contributor

Choose a reason for hiding this comment

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

should this $(expr $(nproc) - 1) to avoid overloading systems when running docker/build.sh?

Copy link
Contributor Author

@mshr-h mshr-h Nov 10, 2021

Choose a reason for hiding this comment

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

Ok.

Copy link
Contributor

@areusch areusch left a comment

Choose a reason for hiding this comment

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

thanks @mshr-h and sorry for the delay!

@areusch areusch merged commit 4c47676 into apache:main Jan 3, 2022
@mshr-h mshr-h deleted the ci-caffessd branch January 5, 2022 10:50
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 7, 2022
…che#9060)

* Change the caffe deps into SSD distribution

* update make flag

* remove `rm -rf /var/lib/apt/lists/*`

* install all python packages in one pip command

* install latest package version

* add caffe-frontend dependencies
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
…che#9060)

* Change the caffe deps into SSD distribution

* update make flag

* remove `rm -rf /var/lib/apt/lists/*`

* install all python packages in one pip command

* install latest package version

* add caffe-frontend dependencies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants