-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile.prod
More file actions
34 lines (29 loc) · 1.1 KB
/
Dockerfile.prod
File metadata and controls
34 lines (29 loc) · 1.1 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
FROM ghcr.io/miguelcarcamov/gpuvmem:base
# Build arguments
ARG CUDA_ARCH=75
# Build configuration
ENV BUILD_DIR=build \
CONFIG=Release \
CUDA_ARCH=${CUDA_ARCH}
# Clone and build gpuvmem
RUN --mount=type=secret,id=BRANCH_NAME \
BRANCH_NAME=$(cat /run/secrets/BRANCH_NAME) && \
echo "Building from branch: ${BRANCH_NAME}" && \
git clone -b "${BRANCH_NAME}" --depth 1 \
https://github.com/miguelcarcamov/gpuvmem.git /tmp/gpuvmem && \
cd /tmp/gpuvmem && \
cmake . -B ${BUILD_DIR} \
-DCMAKE_BUILD_TYPE=${CONFIG} \
-DCUDA_ARCH=${CUDA_ARCH} && \
cmake --build ${BUILD_DIR} \
--target install \
--verbose \
-j$(nproc) && \
pip3 install --no-cache-dir -r requirements.txt && \
mkdir -p ${HOME}/.casa/data && \
rm -rf /tmp/gpuvmem
# Verify installation
RUN test -f /usr/local/bin/gpuvmem || test -f /usr/bin/gpuvmem && \
echo "gpuvmem installed successfully"
LABEL org.opencontainers.image.source="https://github.com/miguelcarcamov/gpuvmem" \
org.opencontainers.image.description="Production image for gpuvmem"