-
Notifications
You must be signed in to change notification settings - Fork 2
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
9 changed files
with
89 additions
and
1 deletion.
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,56 @@ | ||
FROM nvidia/cuda:12.6.3-cudnn-runtime-ubuntu24.04 | ||
|
||
COPY /script/startup.sh /usr/start/startup.sh | ||
|
||
RUN apt update && \ | ||
apt install -y \ | ||
net-tools \ | ||
iproute2 \ | ||
iputils-ping \ | ||
curl \ | ||
sudo \ | ||
wget \ | ||
netcat-openbsd \ | ||
vim \ | ||
openssl \ | ||
make \ | ||
git && \ | ||
mkdir -p /usr/start && \ | ||
apt clean | ||
|
||
RUN chmod +x /usr/start/startup.sh && \ | ||
apt-get update && \ | ||
apt-get install -y \ | ||
dumb-init \ | ||
openssh-client \ | ||
openssh-server && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
mkdir -p /run/sshd && \ | ||
chmod 755 /run/sshd && \ | ||
echo 'AllowTcpForwarding yes' >> /etc/ssh/sshd_config && \ | ||
echo 'GatewayPorts yes' >> /etc/ssh/sshd_config && \ | ||
echo 'X11Forwarding yes' >> /etc/ssh/sshd_config && \ | ||
echo 'Port 22' >> /etc/ssh/sshd_config && \ | ||
useradd -m -s /bin/bash devbox && \ | ||
usermod -aG sudo devbox && \ | ||
echo 'devbox ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers && \ | ||
rm -rf /tmp/* && \ | ||
mkdir -p /home/devbox/.ssh && \ | ||
chown -R devbox:devbox /home/devbox/.ssh && \ | ||
chmod -R 770 /home/devbox/.ssh | ||
|
||
USER devbox | ||
COPY /OS/debian-ssh/project /home/devbox/project | ||
RUN sudo chown -R devbox:devbox /home/devbox/project && \ | ||
sudo chmod -R 777 /home/devbox/project && \ | ||
sudo chmod -R +x /home/devbox/project/entrypoint.sh | ||
|
||
|
||
USER root | ||
|
||
ENTRYPOINT ["/usr/bin/dumb-init", "--"] | ||
CMD ["sudo", "-E", "/usr/start/startup.sh"] | ||
|
||
WORKDIR /home/devbox/project | ||
EXPOSE 22 |
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,7 @@ | ||
{ | ||
"recommendations": [ | ||
"pomdtr.excalidraw-editor", | ||
"editorconfig.editorconfig", | ||
"lokalise.i18n-ally" | ||
] | ||
} |
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 @@ | ||
./hello.sh |
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,5 @@ | ||
#!/bin/bash | ||
|
||
while :; do | ||
{ echo -ne "HTTP/1.1 200 OK\r\nContent-Length: $(echo -n "Hello, World!")\r\n\r\nHello, World!"; } | nc -l -p 8080 -q 1 | ||
done |
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,8 @@ | ||
deb [trusted=yes] http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse | ||
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse | ||
deb [trusted=yes] http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse | ||
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse | ||
deb [trusted=yes] http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse | ||
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse | ||
deb [trusted=yes] http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse | ||
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse |
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,9 @@ | ||
#!/bin/bash | ||
|
||
DOCKERFILE=$1 | ||
echo "DOCKERFILE: $DOCKERFILE" | ||
TMP_DOCKERFILE="${DOCKERFILE}tmp" | ||
cp $DOCKERFILE $TMP_DOCKERFILE | ||
|
||
sed -i '$i\ | ||
COPY /OS/ubuntu/sources.list /etc/apt/sources.list' "$TMP_DOCKERFILE" |
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 |
---|---|---|
|
@@ -37,3 +37,4 @@ c=c | |
quarkus=quarkus | ||
nginx=nginx | ||
sealaf=Laf | ||
ubuntu-cuda=ubuntu-cuda |
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 |
---|---|---|
|
@@ -37,3 +37,4 @@ c=8080 | |
quarkus=8080 | ||
nginx=80 | ||
sealaf=2342 | ||
ubuntu-cuda=8080 |
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