Skip to content

Commit

Permalink
1.45
Browse files Browse the repository at this point in the history
Add openssl supports.
  • Loading branch information
cainmagi committed Feb 2, 2021
1 parent 0998874 commit 9cffd48
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Datafolder and zipped files

/datafiles
*.tar.gz
*.tar.xz
*.tar
*.zip
*.rar
*.7z
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ To make use of this service, just copy this branch to your `/usr/local/bin/` lik
And you could use such simple command on your Bash:

```Bash
$ noVNC IP=192.168.127.128:5901 PORT=6080
noVNC IP=192.168.127.128:5901 PORT=6080
```

where `5901` is the entry (input) port and `6080` is the service (output) port.
Expand All @@ -35,19 +35,19 @@ Here is the list of each dockerfile:
1. xubuntu at the branch [**xubuntu**](https://github.com/cainmagi/Dockerfiles/tree/xubuntu)

Run such a command to build the newest image online:

```Bash
$ nvidia-docker build -t xubuntu:1.12 https://github.com/cainmagi/Dockerfiles.git#xubuntu
nvidia-docker build -t xubuntu:1.0 https://github.com/cainmagi/Dockerfiles.git#xubuntu
```
2. xubuntu-tf at the branch [**xubuntu-tf**](https://github.com/cainmagi/Dockerfiles/tree/xubuntu-tf)

2. jupyterlab at the branch [**jupyterlab**](https://github.com/cainmagi/Dockerfiles/tree/jupyterlab)

Run such a command to build the newest image online:

```Bash
$ nvidia-docker build -t xubuntu-tf:1.25 https://github.com/cainmagi/Dockerfiles.git#xubuntu-tf
nvidia-docker build -t jlab:1.0 https://github.com/cainmagi/Dockerfiles.git#jupyterlab
```

## Update records

See the update records in [docs-DGX branch](https://github.com/cainmagi/Dockerfiles/blob/docs-DGX/index.md#update-records).
7 changes: 7 additions & 0 deletions dockerfiles.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"folders": [
{
"path": "."
}
]
}
35 changes: 31 additions & 4 deletions noVNC
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@

PORT=0
IP=192.168.127.128:5901
PEM=""
GEN=""

for ARGUMENT in "$@"
do
KEY=$(echo $ARGUMENT | cut -f1 -d=)
VALUE=$(echo $ARGUMENT | cut -f2 -d=)
case "$KEY" in
PORT) PORT=${VALUE} ;;
IP) IP=${VALUE} ;;
IP) IP=${VALUE} ;;
PEM) PEM=${VALUE} ;;
GEN) GEN=${VALUE} ;;
*)
esac
done
Expand All @@ -35,9 +39,32 @@ echo "Note that you need to replace \"$HOSTNAME\" with \"$MACHINE_IP\" in the UR
echo " http://$MACHINE_IP:$SHOWPORT/vnc.html?host=$MACHINE_IP&port=$SHOWPORT"
echo "---------------------"

if [ "$PORT" = "0" ]
if [ "$PORT" != "0" ]
then
PORT_OPTION="--listen $PORT"
else
PORT_OPTION=""
fi

if [ "x${GEN}" != "x" ]
then
openssl req -new -x509 -days 365 -nodes -out ${GEN} -keyout ${GEN}
if [ "x${PEM}" = "x" ]
then
PEM=${GEN}
fi
fi

if [ "x${PEM}" = "x" ] && [ "x${GEN}" != "x" ]
then
PEM=${GEN}
fi

if [ "x${PEM}" != "x" ]
then
/usr/local/bin/noVNCbin/utils/launch.sh --vnc $IP
SSL_OPTION="--cert ${PEM} --key ${PEM}"
else
/usr/local/bin/noVNCbin/utils/launch.sh --vnc $IP --listen $PORT
SSL_OPTION=""
fi

/usr/local/bin/noVNCbin/utils/launch.sh --vnc $IP ${PORT_OPTION} ${SSL_OPTION}
2 changes: 1 addition & 1 deletion noVNCbin

0 comments on commit 9cffd48

Please sign in to comment.