diff --git a/official-templates/better-ollama/Dockerfile b/official-templates/better-ollama/Dockerfile new file mode 100644 index 0000000..ba1d778 --- /dev/null +++ b/official-templates/better-ollama/Dockerfile @@ -0,0 +1,32 @@ +# Base Image +FROM madiator2011/better-pytorch:cuda12.1 + +# Install necessary dependencies +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + curl \ + && rm -rf /var/lib/apt/lists/* + +# Download and install Ollama +RUN curl -L https://ollama.com/download/ollama-linux-amd64 -o /usr/bin/ollama && \ + chmod +x /usr/bin/ollama + +COPY settings.json /root/.local/share/code-server/User/settings.json +COPY tasks.json /root/.local/share/code-server/User/tasks.json + +# Start Scripts +COPY --from=scripts start.sh / +RUN chmod +x /start.sh + +# Set environment variables for runtime +ENV OLLAMA_HOST=0.0.0.0 +ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64 +ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility +ENV NVIDIA_VISIBLE_DEVICES=all + +# Expose the required port +EXPOSE 11434 + + +CMD ["/start.sh"] diff --git a/official-templates/better-ollama/docker-bake.hcl b/official-templates/better-ollama/docker-bake.hcl new file mode 100644 index 0000000..6555438 --- /dev/null +++ b/official-templates/better-ollama/docker-bake.hcl @@ -0,0 +1,18 @@ +group "default" { + targets = ["py310-cuda121"] +} + +target "py310-cuda121" { + contexts = { + scripts = "../../container-template" + proxy = "../../container-template/proxy" + logo = "../../container-template" + } + dockerfile = "Dockerfile" + args = { + BASE_IMAGE = "madiator2011/better-pytorch:cuda12.1", + TORCH = "torch==2.3.0+cu121 -f https://download.pytorch.org/whl/torch_stable.html", + PYTHON_VERSION = "3.10" + } + tags = ["madiator2011/better-ollama:cuda12.1"] +} diff --git a/official-templates/better-ollama/settings.json b/official-templates/better-ollama/settings.json new file mode 100644 index 0000000..26fbc88 --- /dev/null +++ b/official-templates/better-ollama/settings.json @@ -0,0 +1,36 @@ +{ + "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, + "terminal.integrated.defaultProfile.linux": "bash", + "terminal.integrated.profiles.linux": { + "bash": { + "path": "/bin/bash", + "args": [] + } + }, + "workbench.startupEditor": "none", + "workbench.panel.defaultLocation": "bottom", + "terminal.integrated.showLinkHover": true, + "terminal.integrated.tabs.enabled": true, + "terminal.integrated.enableBell": true, + "terminal.integrated.scrollback": 1000, + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "terminal.integrated.shellArgs.linux": [ + "-c", "code -r . --run-task=\"Open Terminal\"" + ] +} diff --git a/official-templates/better-ollama/tasks.json b/official-templates/better-ollama/tasks.json new file mode 100644 index 0000000..0892724 --- /dev/null +++ b/official-templates/better-ollama/tasks.json @@ -0,0 +1,15 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Open Terminal", + "type": "shell", + "command": "echo 'Terminal Opened'", + "problemMatcher": [], + "presentation": { + "reveal": "always", + "panel": "shared" + } + } + ] +}