fix: docker script

This commit is contained in:
Googlefan
2024-09-11 05:35:56 +00:00
parent af8f13c95a
commit 5b4ce08d99
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