-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into prep/v1.6.0-rc2
- Loading branch information
Showing
6 changed files
with
96 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
echo $@ | ||
|
||
if [ $nettype = "calibnet" ];then | ||
nettype="cali" | ||
fi | ||
|
||
echo "nettype:" | ||
echo $nettype | ||
./venus daemon --network=${nettype} --auth-url=http://127.0.0.1:8989 --import-snapshot /snapshot.car |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# build container stage | ||
FROM golang:1.17 AS build-env | ||
|
||
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list | ||
|
||
|
||
# download dependence | ||
RUN apt-get update -y | ||
RUN apt-get install -y \ | ||
mesa-opencl-icd ocl-icd-opencl-dev bzr jq pkg-config hwloc libhwloc-dev | ||
RUN apt-get install -y \ | ||
gcc clang build-essential | ||
RUN apt-get install -y \ | ||
make ncftp git curl wget |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM ubuntu:20.04 | ||
|
||
# install dependence | ||
RUN apt-get -qq update \ | ||
&& apt-get -qq install -y --no-install-recommends ca-certificates curl vim telnet | ||
|
||
# set time zone to Shanghai | ||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime | ||
RUN echo 'Asia/Shanghai' >/etc/timezone | ||
|
||
# set charset | ||
ENV LANG C.UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM filvenus/venus-buildenv AS buildenv | ||
|
||
COPY . ./venus | ||
RUN export GOPROXY=https://goproxy.cn && cd venus && make | ||
RUN cd venus && ldd ./venus | ||
|
||
|
||
FROM filvenus/venus-runtime | ||
|
||
# DIR for app | ||
WORKDIR /app | ||
|
||
# copy the app from build env | ||
COPY --from=buildenv /go/venus/venus /app/venus | ||
COPY ./docker/script /script | ||
|
||
# copy ddl | ||
COPY --from=buildenv /usr/lib/x86_64-linux-gnu/libhwloc.so.5 \ | ||
/usr/lib/x86_64-linux-gnu/libOpenCL.so.1 \ | ||
/lib/x86_64-linux-gnu/libgcc_s.so.1 \ | ||
/lib/x86_64-linux-gnu/libutil.so.1 \ | ||
/lib/x86_64-linux-gnu/librt.so.1 \ | ||
/lib/x86_64-linux-gnu/libpthread.so.0 \ | ||
/lib/x86_64-linux-gnu/libm.so.6 \ | ||
/lib/x86_64-linux-gnu/libdl.so.2 \ | ||
/lib/x86_64-linux-gnu/libc.so.6 \ | ||
/usr/lib/x86_64-linux-gnu/libnuma.so.1 \ | ||
/usr/lib/x86_64-linux-gnu/libltdl.so.7 \ | ||
/lib/ | ||
|
||
EXPOSE 3453 | ||
ENTRYPOINT ["/app/venus","daemon"] |