-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Start with CUDA base image | ||
FROM nvidia/cuda:10.1-devel-ubuntu16.04 | ||
MAINTAINER Kai Arulkumaran <design@kaixhin.com> | ||
|
||
# Install OpenSSH, X server and libgtk (for NVIDIA Visual Profiler) | ||
RUN apt-get update && apt-get install -y \ | ||
openssh-server \ | ||
xdm \ | ||
libgtk2.0-0 | ||
# Set password | ||
COPY password.txt . | ||
RUN mkdir /var/run/sshd && \ | ||
echo "root:`cat password.txt`" | chpasswd && \ | ||
# Allow root login with password | ||
sed -i 's/prohibit-password/yes/' /etc/ssh/sshd_config && \ | ||
echo "AllowUsers root" >> /etc/ssh/sshd_config && \ | ||
# Clean up | ||
rm password.txt | ||
# Expose SSH port | ||
EXPOSE 22 | ||
# Add CUDA back to path during SSH | ||
RUN echo "export PATH=$PATH" >> /etc/profile && \ | ||
echo "ldconfig" >> /etc/profile | ||
|
||
# Run SSH daemon | ||
CMD ["/usr/sbin/sshd", "-D"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
[![Docker Pulls](https://img.shields.io/docker/pulls/kaixhin/cuda-ssh.svg)](https://hub.docker.com/r/kaixhin/cuda-ssh/) | ||
[![Docker Stars](https://img.shields.io/docker/stars/kaixhin/cuda-ssh.svg)](https://hub.docker.com/r/kaixhin/cuda-ssh/) | ||
|
||
cuda-ssh | ||
======== | ||
Ubuntu Core 16.04 + [CUDA 10.1](http://www.nvidia.com/object/cuda_home_new.html) + SSH server + X server (for NVIDIA Visual Profiler). | ||
|
||
Requirements | ||
------------ | ||
|
||
- [NVIDIA Docker](https://github.com/NVIDIA/nvidia-docker) - see [requirements](https://github.com/NVIDIA/nvidia-docker/wiki/CUDA#requirements) for more details. | ||
|
||
Build | ||
----- | ||
Include password.txt with the password for sshd (by default this is "password"). | ||
|
||
Usage | ||
----- | ||
Use NVIDIA Docker: ``nvidia-docker run -dP kaixhin/cuda-ssh``. | ||
|
||
The default password should be changed. To do so start up a container and then run `docker exec <id> bash -c "echo 'root:<password>' | chpasswd"`. | ||
|
||
For automatically mapping a SSH port use ``nvidia-docker run -dP kaixhin/cuda-ssh`` and `docker port <id>` to retrieve the port. | ||
For specifying the port manually use ``nvidia-docker run -d -p <port>:22 kaixhin/cuda-ssh``. | ||
The shell can be entered as usual using ``nvidia-docker run -it kaixhin/cuda-ssh bash``. | ||
|
||
The NVIDIA Visual Profiler (`nvvp`) can be accessed with an X client, after having run ssh with the `-X` flag. | ||
|
||
For more information on CUDA on Docker, see the [repo readme](https://github.com/Kaixhin/dockerfiles#cuda). | ||
|
||
Citation | ||
-------- | ||
If you find this useful in research please consider [citing this work](https://github.com/Kaixhin/dockerfiles/blob/master/CITATION.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
password |