mirror of
https://github.com/keylase/nvidia-patch.git
synced 2024-08-30 18:32:50 +00:00
added dockerfile and docker entrypoint script
This commit is contained in:
parent
bd8fc13d7f
commit
d34338ba70
7
Dockerfile
Normal file
7
Dockerfile
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
FROM nvidia/cuda:latest
|
||||||
|
|
||||||
|
RUN mkdir -p /usr/local/bin /patched-lib
|
||||||
|
COPY patch.sh docker-entrypoint.sh /usr/local/bin/
|
||||||
|
RUN chmod +x /usr/local/bin/patch.sh /usr/local/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
|
14
docker-entrypoint.sh
Normal file
14
docker-entrypoint.sh
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "/patched-lib" > /etc/ld.so.conf.d/000-patched-lib.conf && \
|
||||||
|
PATCH_OUTPUT_DIR=/patched-lib /usr/local/bin/patch.sh && \
|
||||||
|
cd /patched-lib && \
|
||||||
|
for f in * ; do
|
||||||
|
suffix="${f##*.so}"
|
||||||
|
name="$(basename "$f" "$suffix")"
|
||||||
|
ln -s "$f" "$name"
|
||||||
|
ln -s "$f" "$name.1"
|
||||||
|
done && \
|
||||||
|
ldconfig
|
||||||
|
[ "$OLDPWD" ] && cd -
|
||||||
|
exec "$@"
|
Loading…
Reference in New Issue
Block a user