refactor and .drone.yml
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
ale 2024-11-04 00:43:07 +01:00
parent 62fcc2041a
commit 1f58a7fc5a
3 changed files with 47 additions and 13 deletions

38
.drone.yml Normal file
View File

@ -0,0 +1,38 @@
kind: pipeline
name: code-build-linux-amd64
type: docker
platform:
os: linux
arch: arm64
steps:
- name: build
image: docker:dind
privileged: true
environment:
USER:
from_secret: user
PASS:
from_secret: pass
REGISTRY:
from_secret: registry
volumes:
- name: dockersock
path: /var/run/docker.sock
commands:
- docker login -u $USER -p $PASS $REGISTRY
- docker run --rm --privileged $REGISTRY/qemu-user-static --reset -p yes
- docker buildx build --platform amd64 -t $REGISTRY/docker-ffmpeg-gpu .
- docker push $REGISTRY/docker-ffmpeg-gpu
- docker tag $REGISTRY/docker-ffmpeg-gpu $REGISTRY/docker-ffmpeg-gpu:amd64
- docker push $REGISTRY/docker-ffmpeg-gpu:amd64
when:
event:
- push
- tag
volumes:
- name: dockersock
host:
path: /var/run/docker.sock

View File

@ -19,6 +19,10 @@ Use `ffmpeg` with `docker` and `nvidia` powers to transcode in Debian 11 Bullsey
$ git clone https://git.manalejandro.com/ale/docker-ffmpeg-gpu $ git clone https://git.manalejandro.com/ale/docker-ffmpeg-gpu
$ cd docker-ffmpeg-gpu && docker-compose build --force-rm $ cd docker-ffmpeg-gpu && docker-compose build --force-rm
## Pull docker image
$ docker pull registry.manalejandro.com/docker-ffmpeg-gpu
## Usage ## Usage
### You can use "/ffmpeg" or "/ffmpeg-pascal" for architecture version ### You can use "/ffmpeg" or "/ffmpeg-pascal" for architecture version

View File

@ -1,22 +1,14 @@
version: '3'
services: services:
nvidia-ffmpeg: docker-ffmpeg-gpu:
# image: registry.manalejandro.com/docker-ffmpeg-gpu
build: ./ build: ./
image: nvidia-ffmpeg image: docker-ffmpeg-gpu
container_name: nvidia-ffmpeg container_name: docker-ffmpeg-gpu
restart: "no" restart: "no"
deploy:
resources:
reservations:
devices:
- driver: nvidia
capabilities: [gpu]
environment: environment:
- NVIDIA_VISIBLE_DEVICES=all - NVIDIA_VISIBLE_DEVICES=all
entrypoint: entrypoint:
- /bin/sleep - /ffmpeg
- infinity
volumes: volumes:
- ./folder:/folder - ./folder:/folder
- /usr/lib/x86_64-linux-gnu/nvidia/current:/cuda:ro - /usr/lib/x86_64-linux-gnu/nvidia/current:/cuda:ro