Skip to content

Commit

Permalink
build: add docker support
Browse files Browse the repository at this point in the history
  • Loading branch information
zaventh committed Jun 7, 2023
1 parent a2373d9 commit fd25dc3
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
*.iml
*.exe
7zr
*.log
*.json
!/tests/*.json
crackers
preprocessors
prince
files
hashlists
__pycache__
*.zip
.idea
venv/
lock.pid
.env
Dockerfile
.*
40 changes: 40 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# syntax=docker/dockerfile:1.3
FROM nvidia/cuda:12.1.1-devel-ubuntu22.04

ENV APPDIR /usr/local/app

WORKDIR ${APPDIR}
COPY . ${APPDIR}/

RUN \
--mount=type=cache,target=/var/cache/apt \
apt update && apt 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}

RUN \
--mount=type=cache,target=/root/.cache/pip \
pip3 install -r requirements.txt && \
./build.sh

ENTRYPOINT ["python3", "hashtopolis.zip"]

0 comments on commit fd25dc3

Please sign in to comment.