Commit 804781a0 authored by nanahira's avatar nanahira

first

parent 5069d8c9
Pipeline #29345 failed with stages
in 5 minutes and 8 seconds
.git*
Dockerfile
.dockerignore
dist
*.o
*.so
.DS_store
cache-opencl.*
bin
profanity.x64
README_dev.md
stages:
- build
- deploy
variables:
GIT_DEPTH: "1"
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
.build-image:
stage: build
script:
- docker build --pull -t $TARGET_IMAGE .
- docker push $TARGET_IMAGE
build-x86:
extends: .build-image
tags:
- docker
variables:
TARGET_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-x86
.deploy:
stage: deploy
tags:
- docker
script:
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-x86
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-x86 $TARGET_IMAGE
- docker push $TARGET_IMAGE
deploy_latest:
extends: .deploy
variables:
TARGET_IMAGE: $CI_REGISTRY_IMAGE:latest
only:
- main
deploy_branch:
extends: .deploy
variables:
TARGET_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
FROM nvidia/cuda:12.0.0-runtime-ubuntu22.04 as base
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libcurl4-openssl-dev \
ocl-icd-libopencl1 \
opencl-headers \
clinfo pkg-config && \
rm -rf /var/lib/apt/lists/* && \
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
# nvidia-container-runtime
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
FROM base as builder
WORKDIR /src
COPY . ./
RUN make -j$(nproc)
FROM base
COPY --from=builder /src/profanity.x64 /usr/bin/profanity
WORKDIR /app
...@@ -9,7 +9,7 @@ ifeq ($(UNAME_S),Darwin) ...@@ -9,7 +9,7 @@ ifeq ($(UNAME_S),Darwin)
LDFLAGS=-framework OpenCL -lcurl LDFLAGS=-framework OpenCL -lcurl
CFLAGS=-c -std=c++11 -Wall -mmmx -O2 CFLAGS=-c -std=c++11 -Wall -mmmx -O2
else else
LDFLAGS=-s -lOpenCL -mcmodel=large LDFLAGS=-s -L/usr/lib/x86_64-linux-gnu -lOpenCL -lcurl -mcmodel=large
CFLAGS=-c -std=c++11 -Wall -mmmx -O2 -mcmodel=large CFLAGS=-c -std=c++11 -Wall -mmmx -O2 -mcmodel=large
endif endif
...@@ -23,4 +23,3 @@ $(EXECUTABLE): $(OBJECTS) ...@@ -23,4 +23,3 @@ $(EXECUTABLE): $(OBJECTS)
clean: clean:
rm -rf *.o rm -rf *.o
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment