Skip to content

Commit

Permalink
Create additional runner Dockerfile and separate from build
Browse files Browse the repository at this point in the history
  • Loading branch information
Djadih committed Oct 23, 2024
1 parent ea1d42f commit e4631d0
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile → Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM ubuntu:20.04
# Set environment variables to avoid user interaction during package installation
ENV DEBIAN_FRONTEND=noninteractive

# Install required dependencies including CUDA
# Install required dependencies including CUDA toolkit
RUN apt update && apt install -y \
build-essential \
cmake \
Expand All @@ -16,10 +16,10 @@ RUN apt update && apt install -y \
apt update && apt install -y cuda-toolkit-12-6 && \
rm -rf /var/lib/apt/lists/* /cuda-keyring_1.1-1_all.deb

# Copy dependency and build scripts into the container
# Copy dependency and build script into the container
COPY deploy_miner.sh .

# Make the script executable
# Make deploy script executable
RUN chmod +x deploy_miner.sh

# Run the script to build the binary
Expand Down
21 changes: 21 additions & 0 deletions Dockerfile.run
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Use an Ubuntu image or another suitable base image
FROM quainetwork/quai-gpu-miner:v0.2.0

RUN ./deploy_miner.sh

RUN wget https://repo.radeon.com/amdgpu-install/latest/ubuntu/focal/amdgpu-install_6.2.60202-1_all.deb && \
apt update && apt install -y \
./amdgpu-install_6.2.60202-1_all.deb \
cuda-drivers

RUN amdgpu-install -y --accept-eula

ENV PLATFORM=""
ENV STRATUM_IP=""
ENV STRATUM_PORT=""

# Entrypoint is sh so it can accept the arguments
ENTRYPOINT ["sh", "-c"]

# CMD will construct the full command using the environment variables
CMD ["./quai-gpu-miner/quai-gpu-miner/quai-gpu-miner -${PLATFORM} -P stratum://${STRATUM_IP}:${STRATUM_PORT}"]

0 comments on commit e4631d0

Please sign in to comment.