-
Notifications
You must be signed in to change notification settings - Fork 189
/
Copy pathDockerfile
69 lines (55 loc) · 1.79 KB
/
Dockerfile
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
FROM ubuntu:22.04
RUN apt-get clean && apt-get update &&\
set -eux &&\
apt-get --no-install-recommends -y install \
lsof \
curl \
git \
ca-certificates \
wget \
vim \
python3 \
python3-distutils \
python3-apt \
sysstat \
attr \
net-tools \
iproute2 \
make \
gnupg \
iputils-ping &&\
apt-get -y clean all
RUN wget https://bootstrap.pypa.io/get-pip.py &&\
python3 get-pip.py &&\
pip install awscli s3cmd
# Setting ENV variables
ENV GOLANG_VERSION="1.23.4"
# Reassign arguments to environment variables so run.sh can use them
ENV GOPATH /go
ENV GOBIN $GOPATH/bin
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
# Installing go
RUN mkdir -p "$GOPATH/bin" && chmod -R 777 "$GOPATH"
RUN curl -LO https://go.dev/dl/go${GOLANG_VERSION}.linux-amd64.tar.gz &&\
tar -C /usr/local -xvzf go${GOLANG_VERSION}.linux-amd64.tar.gz > /dev/null 2>&1 &&\
rm -rf go${GOLANG_VERSION}.linux-amd64.tar.gz
# Install statsd
RUN git clone https://github.com/etsy/statsd.git
ENV AIS_CONF_DIR /tmp/.conf
ENV AIS_CONF_FILE ${AIS_CONF_DIR}/ais.json
ENV AIS_LOCAL_CONF_FILE ${AIS_CONF_DIR}/ais_local.json
ENV COLLECTD_CONF_FILE ${AIS_CONF_DIR}/collectd.conf
ENV STATSD_CONF_FILE ${AIS_CONF_DIR}/statsd.conf
ENV MOUNTPATH /tmp/ais
COPY utils.sh utils.sh
COPY aisnode_config.sh aisnode_config.sh
COPY entrypoint/entrypoint.sh entrypoint.sh
COPY limits.conf /etc/security/limits.conf
RUN mkdir -p $GOPATH/src/github.com/NVIDIA && \
cd $GOPATH/src/github.com/NVIDIA && \
git clone https://github.com/NVIDIA/aistore.git && \
cd ${GOPATH}/src/github.com/NVIDIA/aistore && \
AIS_BACKEND_PROVIDERS="aws azure gcp" make node
WORKDIR "${GOPATH}/src/github.com/NVIDIA/aistore"
EXPOSE 51080 9080 10080
ENTRYPOINT ["sh", "-c", "/entrypoint.sh"]