Added Better Ollama template

This commit is contained in:
Madiator2011 2024-07-11 20:32:39 +02:00 committed by GitHub
parent 00366c86e4
commit 656abb6292
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 101 additions and 0 deletions

View file

@ -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"]

View file

@ -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"]
}

View file

@ -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\""
]
}

View file

@ -0,0 +1,15 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Open Terminal",
"type": "shell",
"command": "echo 'Terminal Opened'",
"problemMatcher": [],
"presentation": {
"reveal": "always",
"panel": "shared"
}
}
]
}