Merge pull request #17 from Googlefan256/main

fix: docker script
This commit is contained in:
コマリン親衛隊
2024-09-11 14:37:50 +09:00
committed by GitHub
2 changed files with 6 additions and 3 deletions

View File

@@ -2,9 +2,9 @@ FROM rust AS builder
WORKDIR /work
COPY . .
RUN cargo build -r --bin sbv2_api -F cuda,cuda_tf32
FROM nvidia/cuda:12.6.1-cudnn-runtime-ubuntu24.04
FROM nvidia/cuda:12.3.2-cudnn9-runtime-ubuntu22.04
WORKDIR /work
COPY --from=builder /work/target/release/sbv2_api /work/main
COPY --from=builder /work/target/release/*.so /work
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/work
CMD ["/work/main"]

5
docker/run.sh Normal file → Executable file
View File

@@ -1 +1,4 @@
docker run -it --rm -p 3000:3000 --name sbv2 -v ./models:/work/models --env-file .env sbv2
docker run -it --rm -p 3000:3000 --name sbv2 \
-v ./models:/work/models --env-file .env \
--gpus all \
ghcr.io/tuna2134/sbv2-api:cuda