-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (34 loc) · 1.06 KB
/
Dockerfile
File metadata and controls
47 lines (34 loc) · 1.06 KB
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
FROM alpine/git AS preprocess
RUN apk add --no-cache bash zip
COPY . /htp
RUN cd /htp && bash build.sh && ls /htp
FROM nvidia/cuda:12.3.2-devel-ubuntu22.04 AS agent-cuda
ENV APPDIR=/htp
WORKDIR ${APPDIR}
RUN \
--mount=type=cache,target=/var/cache/apt \
apt-get update && apt-get install -y --no-install-recommends \
zip \
p7zip-full \
git \
python3 \
python3-pip \
python3-psutil \
python3-requests \
pciutils \
ca-certificates \
rsync \
ocl-icd-libopencl1 \
clinfo \
curl && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /etc/OpenCL/vendors && \
echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd && \
echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && \
echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf
ENV PATH=/usr/local/nvidia/bin:${PATH}
ENV LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:${LD_LIBRARY_PATH}
COPY --from=preprocess /htp/hashtopolis.zip ${APPDIR}/
COPY requirements.txt ${APPDIR}
RUN pip3 install -r requirements.txt
ENTRYPOINT ["python3", "hashtopolis.zip"]