mirror of
https://github.com/kodxana/madiator-docker-runpod.git
synced 2024-11-13 23:15:19 +01:00
Compare commits
16 commits
794f6e04bc
...
b10b94fbcb
Author | SHA1 | Date | |
---|---|---|---|
|
b10b94fbcb | ||
|
65577e52f9 | ||
|
6094896bcc | ||
|
9461b994e9 | ||
|
37621ba815 | ||
|
923bb11a24 | ||
|
1eddb32348 | ||
|
404761cfb3 | ||
|
db5fb167ba | ||
|
29de5b6648 | ||
|
f0457bdff4 | ||
|
776cb95c96 | ||
|
f8f9d548ad | ||
|
3cedf754d3 | ||
|
f77a1f07ee | ||
|
01ba79b48a |
7 changed files with 318 additions and 8 deletions
74
official-templates/better-base-rocm/Dockerfile
Normal file
74
official-templates/better-base-rocm/Dockerfile
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
ARG BASE_IMAGE
|
||||||
|
FROM ${BASE_IMAGE} AS base
|
||||||
|
|
||||||
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
|
|
||||||
|
# Set environment variables
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
ENV SHELL=/bin/bash
|
||||||
|
|
||||||
|
# Set the working directory
|
||||||
|
WORKDIR /
|
||||||
|
|
||||||
|
# Create workspace directory
|
||||||
|
RUN mkdir /workspace
|
||||||
|
|
||||||
|
# Update, upgrade, install packages,
|
||||||
|
RUN apt-get update --yes && \
|
||||||
|
apt-get upgrade --yes && \
|
||||||
|
apt install --yes --no-install-recommends \
|
||||||
|
git wget curl bash libgl1 software-properties-common \
|
||||||
|
openssh-server nginx rsync nano ffmpeg tmux && \
|
||||||
|
apt-get autoremove -y && \
|
||||||
|
apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/* && \
|
||||||
|
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
|
||||||
|
|
||||||
|
RUN pip install --upgrade --no-cache-dir pip
|
||||||
|
|
||||||
|
COPY ms-toolsai.jupyter-2024.7.0.vsix /tmp/ms-toolsai.jupyter-2024.7.0.vsix
|
||||||
|
|
||||||
|
# Install code-server and extensions
|
||||||
|
RUN curl -fsSL https://code-server.dev/install.sh | sh
|
||||||
|
|
||||||
|
RUN curl -L -o /tmp/ms-toolsai.jupyter-2024.6.0.vsix https://open-vsx.org/api/ms-toolsai/jupyter/2024.6.0/file/ms-toolsai.jupyter-2024.6.0.vsix
|
||||||
|
|
||||||
|
# Install code-server extensions
|
||||||
|
RUN code-server --install-extension ms-python.python && \
|
||||||
|
code-server --install-extension /tmp/ms-toolsai.jupyter-2024.6.0.vsix && \
|
||||||
|
code-server --install-extension ms-toolsai.vscode-jupyter-powertoys
|
||||||
|
|
||||||
|
# Pre-install Jupyter kernel and OhMyRunPod
|
||||||
|
RUN pip install ipykernel && \
|
||||||
|
python -m ipykernel install --name "python3" --display-name "Python 3" && \
|
||||||
|
pip install OhMyRunPod
|
||||||
|
|
||||||
|
# Remove existing SSH host keys
|
||||||
|
RUN rm -f /etc/ssh/ssh_host_*
|
||||||
|
|
||||||
|
# Copy necessary files
|
||||||
|
COPY settings.json /root/.local/share/code-server/User/settings.json
|
||||||
|
|
||||||
|
# Final stage: minimal image
|
||||||
|
FROM ${BASE_IMAGE}
|
||||||
|
|
||||||
|
COPY --from=base / /
|
||||||
|
|
||||||
|
# NGINX Proxy
|
||||||
|
COPY --from=proxy nginx.conf /etc/nginx/nginx.conf
|
||||||
|
COPY --from=proxy readme.html /usr/share/nginx/html/readme.html
|
||||||
|
|
||||||
|
# Copy the README.md
|
||||||
|
COPY README.md /usr/share/nginx/html/README.md
|
||||||
|
|
||||||
|
# Start Scripts
|
||||||
|
COPY --from=scripts start.sh /
|
||||||
|
RUN chmod +x /start.sh
|
||||||
|
|
||||||
|
# Welcome Message
|
||||||
|
COPY --from=logo runpod.txt /etc/runpod.txt
|
||||||
|
RUN echo 'cat /etc/runpod.txt' >> /root/.bashrc && \
|
||||||
|
echo 'echo -e "\nFor detailed documentation and guides, please visit:\n\033[1;34mhttps://docs.runpod.io/\033[0m and \033[1;34mhttps://blog.runpod.io/\033[0m\n\n"' >> /root/.bashrc
|
||||||
|
|
||||||
|
# Set the default command for the container
|
||||||
|
CMD [ "/start.sh" ]
|
7
official-templates/better-base-rocm/README.md
Normal file
7
official-templates/better-base-rocm/README.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
## Build Options
|
||||||
|
|
||||||
|
To build with default options, run `docker buildx bake`, to build a specific target, run `docker buildx bake <target>`.
|
||||||
|
|
||||||
|
## Ports
|
||||||
|
|
||||||
|
- 22/tcp (SSH)
|
95
official-templates/better-base-rocm/docker-bake.hcl
Normal file
95
official-templates/better-base-rocm/docker-bake.hcl
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
group "default" {
|
||||||
|
targets = [
|
||||||
|
"py38-rocm56",
|
||||||
|
"py310-rocm57",
|
||||||
|
"py310-rocm602",
|
||||||
|
"py39-rocm60",
|
||||||
|
"py310-rocm61",
|
||||||
|
"py310-rocm612"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
# ROCm Targets
|
||||||
|
target "py38-rocm56" {
|
||||||
|
contexts = {
|
||||||
|
default = "../../container-template"
|
||||||
|
scripts = "../../container-template"
|
||||||
|
proxy = "../../container-template/proxy"
|
||||||
|
logo = "../../container-template"
|
||||||
|
}
|
||||||
|
dockerfile = "Dockerfile"
|
||||||
|
args = {
|
||||||
|
BASE_IMAGE = "rocm/pytorch:rocm5.6_ubuntu20.04_py3.8_pytorch_2.0.1"
|
||||||
|
}
|
||||||
|
tags = ["madiator2011/better-base:rocm5.6"]
|
||||||
|
}
|
||||||
|
|
||||||
|
target "py310-rocm57" {
|
||||||
|
contexts = {
|
||||||
|
default = "../../container-template"
|
||||||
|
scripts = "../../container-template"
|
||||||
|
proxy = "../../container-template/proxy"
|
||||||
|
logo = "../../container-template"
|
||||||
|
}
|
||||||
|
dockerfile = "Dockerfile"
|
||||||
|
args = {
|
||||||
|
BASE_IMAGE = "rocm/pytorch:rocm5.7_ubuntu22.04_py3.10_pytorch_2.0.1"
|
||||||
|
}
|
||||||
|
tags = ["madiator2011/better-base:rocm5.7"]
|
||||||
|
}
|
||||||
|
|
||||||
|
target "py310-rocm602" {
|
||||||
|
contexts = {
|
||||||
|
default = "../../container-template"
|
||||||
|
scripts = "../../container-template"
|
||||||
|
proxy = "../../container-template/proxy"
|
||||||
|
logo = "../../container-template"
|
||||||
|
}
|
||||||
|
dockerfile = "Dockerfile"
|
||||||
|
args = {
|
||||||
|
BASE_IMAGE = "rocm/pytorch:rocm6.0.2_ubuntu22.04_py3.10_pytorch_2.1.2"
|
||||||
|
}
|
||||||
|
tags = ["madiator2011/better-base:rocm6.0.2"]
|
||||||
|
}
|
||||||
|
|
||||||
|
target "py39-rocm60" {
|
||||||
|
contexts = {
|
||||||
|
default = "../../container-template"
|
||||||
|
scripts = "../../container-template"
|
||||||
|
proxy = "../../container-template/proxy"
|
||||||
|
logo = "../../container-template"
|
||||||
|
}
|
||||||
|
dockerfile = "Dockerfile"
|
||||||
|
args = {
|
||||||
|
BASE_IMAGE = "rocm/pytorch:rocm6.0_ubuntu20.04_py3.9_pytorch_2.1.1"
|
||||||
|
}
|
||||||
|
tags = ["madiator2011/better-base:rocm6.0"]
|
||||||
|
}
|
||||||
|
|
||||||
|
target "py310-rocm61" {
|
||||||
|
contexts = {
|
||||||
|
default = "../../container-template"
|
||||||
|
scripts = "../../container-template"
|
||||||
|
proxy = "../../container-template/proxy"
|
||||||
|
logo = "../../container-template"
|
||||||
|
}
|
||||||
|
dockerfile = "Dockerfile"
|
||||||
|
args = {
|
||||||
|
BASE_IMAGE = "rocm/pytorch:rocm6.1_ubuntu22.04_py3.10_pytorch_2.1.2"
|
||||||
|
}
|
||||||
|
tags = ["madiator2011/better-base:rocm6.1"]
|
||||||
|
}
|
||||||
|
|
||||||
|
target "py310-rocm612" {
|
||||||
|
contexts = {
|
||||||
|
default = "../../container-template"
|
||||||
|
scripts = "../../container-template"
|
||||||
|
proxy = "../../container-template/proxy"
|
||||||
|
logo = "../../container-template"
|
||||||
|
}
|
||||||
|
dockerfile = "Dockerfile"
|
||||||
|
args = {
|
||||||
|
BASE_IMAGE = "rocm/pytorch:rocm6.1.2_ubuntu22.04_py3.10_pytorch_release-2.1.2"
|
||||||
|
}
|
||||||
|
tags = ["madiator2011/better-base:rocm6.1.2"]
|
||||||
|
}
|
Binary file not shown.
18
official-templates/better-base-rocm/settings.json
Normal file
18
official-templates/better-base-rocm/settings.json
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"workbench.colorTheme": "Default Dark Modern",
|
||||||
|
"workbench.startupEditor": "none",
|
||||||
|
"workbench.enableExperiments": false,
|
||||||
|
"telemetry.enableTelemetry": false,
|
||||||
|
"telemetry.enableCrashReporter": false,
|
||||||
|
"security.workspace.trust.enabled": false,
|
||||||
|
"update.mode": "manual",
|
||||||
|
"extensions.autoUpdate": false,
|
||||||
|
"python.showStartPage": false,
|
||||||
|
"jupyter.experiments.enabled": false,
|
||||||
|
"jupyter.askForKernelRestart": false,
|
||||||
|
"jupyter.askForKernelSource": false,
|
||||||
|
"jupyter.alwaysTrustNotebooks": true,
|
||||||
|
"extensions.ignoreRecommendations": true,
|
||||||
|
"files.autoSave": "afterDelay",
|
||||||
|
"files.autoSaveDelay": 1000
|
||||||
|
}
|
|
@ -1,9 +1,32 @@
|
||||||
group "default" {
|
group "default" {
|
||||||
targets = ["py310-cuda121", "py310-cuda118", "py310-cuda124"]
|
targets = [
|
||||||
|
"py311-cuda121",
|
||||||
|
"py311-cuda118",
|
||||||
|
"py311-cuda124",
|
||||||
|
"py310-rocm56",
|
||||||
|
"py310-rocm57",
|
||||||
|
"py310-rocm602",
|
||||||
|
"py310-rocm60",
|
||||||
|
"py310-rocm61",
|
||||||
|
"py310-rocm612"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
target "py310-cuda121" {
|
group "rocm" {
|
||||||
|
targets = [
|
||||||
|
"py310-rocm56",
|
||||||
|
"py310-rocm57",
|
||||||
|
"py310-rocm602",
|
||||||
|
"py310-rocm60",
|
||||||
|
"py310-rocm61",
|
||||||
|
"py310-rocm612"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
# CUDA Targets
|
||||||
|
target "py311-cuda121" {
|
||||||
contexts = {
|
contexts = {
|
||||||
|
default = "../../container-template"
|
||||||
scripts = "../../container-template"
|
scripts = "../../container-template"
|
||||||
proxy = "../../container-template/proxy"
|
proxy = "../../container-template/proxy"
|
||||||
logo = "../../container-template"
|
logo = "../../container-template"
|
||||||
|
@ -11,13 +34,14 @@ target "py310-cuda121" {
|
||||||
dockerfile = "Dockerfile"
|
dockerfile = "Dockerfile"
|
||||||
args = {
|
args = {
|
||||||
BASE_IMAGE = "nvidia/cuda:12.1.0-cudnn8-devel-ubuntu22.04",
|
BASE_IMAGE = "nvidia/cuda:12.1.0-cudnn8-devel-ubuntu22.04",
|
||||||
PYTHON_VERSION = "3.10"
|
PYTHON_VERSION = "3.11"
|
||||||
}
|
}
|
||||||
tags = ["madiator2011/better-base:cuda12.1"]
|
tags = ["madiator2011/better-base:cuda12.1"]
|
||||||
}
|
}
|
||||||
|
|
||||||
target "py310-cuda118" {
|
target "py311-cuda118" {
|
||||||
contexts = {
|
contexts = {
|
||||||
|
default = "../../container-template"
|
||||||
scripts = "../../container-template"
|
scripts = "../../container-template"
|
||||||
proxy = "../../container-template/proxy"
|
proxy = "../../container-template/proxy"
|
||||||
logo = "../../container-template"
|
logo = "../../container-template"
|
||||||
|
@ -25,13 +49,14 @@ target "py310-cuda118" {
|
||||||
dockerfile = "Dockerfile"
|
dockerfile = "Dockerfile"
|
||||||
args = {
|
args = {
|
||||||
BASE_IMAGE = "nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04",
|
BASE_IMAGE = "nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04",
|
||||||
PYTHON_VERSION = "3.10"
|
PYTHON_VERSION = "3.11"
|
||||||
}
|
}
|
||||||
tags = ["madiator2011/better-base:cuda11.8"]
|
tags = ["madiator2011/better-base:cuda11.8"]
|
||||||
}
|
}
|
||||||
|
|
||||||
target "py310-cuda124" {
|
target "py311-cuda124" {
|
||||||
contexts = {
|
contexts = {
|
||||||
|
default = "../../container-template"
|
||||||
scripts = "../../container-template"
|
scripts = "../../container-template"
|
||||||
proxy = "../../container-template/proxy"
|
proxy = "../../container-template/proxy"
|
||||||
logo = "../../container-template"
|
logo = "../../container-template"
|
||||||
|
@ -39,7 +64,98 @@ target "py310-cuda124" {
|
||||||
dockerfile = "Dockerfile"
|
dockerfile = "Dockerfile"
|
||||||
args = {
|
args = {
|
||||||
BASE_IMAGE = "nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04",
|
BASE_IMAGE = "nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04",
|
||||||
PYTHON_VERSION = "3.10"
|
PYTHON_VERSION = "3.11"
|
||||||
}
|
}
|
||||||
tags = ["madiator2011/better-base:cuda12.4"]
|
tags = ["madiator2011/better-base:cuda12.4"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ROCm Targets
|
||||||
|
target "py310-rocm56" {
|
||||||
|
contexts = {
|
||||||
|
default = "../../container-template"
|
||||||
|
scripts = "../../container-template"
|
||||||
|
proxy = "../../container-template/proxy"
|
||||||
|
logo = "../../container-template"
|
||||||
|
}
|
||||||
|
dockerfile = "Dockerfile"
|
||||||
|
args = {
|
||||||
|
BASE_IMAGE = "rocm/pytorch:rocm5.6_ubuntu20.04_py3.8_pytorch_2.0.1",
|
||||||
|
PYTHON_VERSION = "3.10"
|
||||||
|
}
|
||||||
|
tags = ["madiator2011/better-base:rocm5.6"]
|
||||||
|
}
|
||||||
|
|
||||||
|
target "py310-rocm57" {
|
||||||
|
contexts = {
|
||||||
|
default = "../../container-template"
|
||||||
|
scripts = "../../container-template"
|
||||||
|
proxy = "../../container-template/proxy"
|
||||||
|
logo = "../../container-template"
|
||||||
|
}
|
||||||
|
dockerfile = "Dockerfile"
|
||||||
|
args = {
|
||||||
|
BASE_IMAGE = "rocm/pytorch:rocm5.7_ubuntu22.04_py3.10_pytorch_2.0.1",
|
||||||
|
PYTHON_VERSION = "3.10"
|
||||||
|
}
|
||||||
|
tags = ["madiator2011/better-base:rocm5.7"]
|
||||||
|
}
|
||||||
|
|
||||||
|
target "py310-rocm602" {
|
||||||
|
contexts = {
|
||||||
|
default = "../../container-template"
|
||||||
|
scripts = "../../container-template"
|
||||||
|
proxy = "../../container-template/proxy"
|
||||||
|
logo = "../../container-template"
|
||||||
|
}
|
||||||
|
dockerfile = "Dockerfile"
|
||||||
|
args = {
|
||||||
|
BASE_IMAGE = "rocm/pytorch:rocm6.0.2_ubuntu22.04_py3.10_pytorch_2.1.2",
|
||||||
|
PYTHON_VERSION = "3.10"
|
||||||
|
}
|
||||||
|
tags = ["madiator2011/better-base:rocm6.0.2"]
|
||||||
|
}
|
||||||
|
|
||||||
|
target "py310-rocm60" {
|
||||||
|
contexts = {
|
||||||
|
default = "../../container-template"
|
||||||
|
scripts = "../../container-template"
|
||||||
|
proxy = "../../container-template/proxy"
|
||||||
|
logo = "../../container-template"
|
||||||
|
}
|
||||||
|
dockerfile = "Dockerfile"
|
||||||
|
args = {
|
||||||
|
BASE_IMAGE = "rocm/pytorch:rocm6.0_ubuntu20.04_py3.9_pytorch_2.1.1",
|
||||||
|
PYTHON_VERSION = "3.10"
|
||||||
|
}
|
||||||
|
tags = ["madiator2011/better-base:rocm6.0"]
|
||||||
|
}
|
||||||
|
|
||||||
|
target "py310-rocm61" {
|
||||||
|
contexts = {
|
||||||
|
default = "../../container-template"
|
||||||
|
scripts = "../../container-template"
|
||||||
|
proxy = "../../container-template/proxy"
|
||||||
|
logo = "../../container-template"
|
||||||
|
}
|
||||||
|
dockerfile = "Dockerfile"
|
||||||
|
args = {
|
||||||
|
BASE_IMAGE = "rocm/pytorch:rocm6.1_ubuntu22.04_py3.10_pytorch_2.1.2",
|
||||||
|
PYTHON_VERSION = "3.10"
|
||||||
|
}
|
||||||
|
tags = ["madiator2011/better-base:rocm6.1"]
|
||||||
|
}
|
||||||
|
|
||||||
|
target "py310-rocm612" {
|
||||||
|
contexts = {
|
||||||
|
default = "../../container-template"
|
||||||
|
scripts = "../../container-template"
|
||||||
|
proxy = "../../container-template/proxy"
|
||||||
|
logo = "../../container-template"
|
||||||
|
}
|
||||||
|
dockerfile = "Dockerfile"
|
||||||
|
args = {
|
||||||
|
BASE_IMAGE = "rocm/pytorch:rocm6.1.2_ubuntu22.04_py3.10_pytorch_release-2.1.2",
|
||||||
|
PYTHON_VERSION = "3.10"
|
||||||
|
}
|
||||||
|
tags = ["madiator2011/better-base:rocm6.1.2"]
|
||||||
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86
|
||||||
rm cuda-keyring_1.1-1_all.deb
|
rm cuda-keyring_1.1-1_all.deb
|
||||||
|
|
||||||
# Download and install Ollama
|
# Download and install Ollama
|
||||||
RUN curl -L https://github.com/ollama/ollama/releases/download/v0.2.8/ollama-linux-amd64 -o /usr/bin/ollama && \
|
RUN curl -L https://github.com/ollama/ollama/releases/download/v0.3.3/ollama-linux-amd64 -o /usr/bin/ollama && \
|
||||||
chmod +x /usr/bin/ollama
|
chmod +x /usr/bin/ollama
|
||||||
|
|
||||||
COPY settings.json /root/.local/share/code-server/User/settings.json
|
COPY settings.json /root/.local/share/code-server/User/settings.json
|
||||||
|
|
Loading…
Reference in a new issue