Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add docker support #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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-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}

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

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