-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile.scout.cuda11_1-arm64
27 lines (26 loc) · 1.24 KB
/
Dockerfile.scout.cuda11_1-arm64
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Scout Docker Image
# Build:
# docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) -f Dockerfile.scout.cuda11_1-arm64 -t scout:cuda11_1-arm64 .
# Run in foreground and remove after:
# docker run -it --rm --gpus all -p 8080:8080 -v HOST_DATA_PATH:/scout/data -v HOST_CONFIG_PATH:/scout/.config -v HOST_LOGS_PATH:/scout/.logs scout:cuda11_1-arm64
# Run in background and keep:
# docker run -d --gpus all -p 8080:8080 -v HOST_DATA_PATH:/scout/data -v HOST_CONFIG_PATH:/scout/.config -v HOST_LOGS_PATH:/scout/.logs scout:cuda11_1-arm64
# Keep Host Date Time Localization
# Add to the lines above: -v /etc/localtime:/etc/localtime:ro
# Scout
FROM gocv:cuda11_1-arm64 AS scout-cuda11_1-arm64
LABEL maintainer="jonotoninnovation"
ARG UNAME=user
ARG UID=1000
ARG GID=1000
RUN groupadd -g $GID -o $UNAME
RUN useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME
RUN mkdir /scout && chown $UID:$GID /scout
WORKDIR /go/src/github.com/jonoton/scout
COPY . .
RUN chown -R $UID:$GID /go
USER $UNAME
RUN mkdir -p /scout/data && mkdir -p /scout/.config && mkdir -p /scout/.logs
RUN ln -s /scout/.config /go/src/github.com/jonoton/scout/.config && ln -s /scout/.logs /go/src/github.com/jonoton/scout/.logs
RUN go get -d -v ./... && go install -v ./...
CMD /go/bin/scout