-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1629 from arc53/easy-deploy
- Loading branch information
Showing
42 changed files
with
1,780 additions
and
695 deletions.
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
11 changes: 11 additions & 0 deletions
11
deployment/optional/docker-compose.optional.ollama-cpu.yaml
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,11 @@ | ||
version: "3.8" | ||
services: | ||
ollama: | ||
image: ollama/ollama | ||
ports: | ||
- "11434:11434" | ||
volumes: | ||
- ollama_data:/root/.ollama | ||
|
||
volumes: | ||
ollama_data: |
16 changes: 16 additions & 0 deletions
16
deployment/optional/docker-compose.optional.ollama-gpu.yaml
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,16 @@ | ||
version: "3.8" | ||
services: | ||
ollama: | ||
image: ollama/ollama | ||
ports: | ||
- "11434:11434" | ||
volumes: | ||
- ollama_data:/root/.ollama | ||
deploy: | ||
resources: | ||
reservations: | ||
devices: | ||
- capabilities: [gpu] | ||
|
||
volumes: | ||
ollama_data: |
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,120 @@ | ||
import Image from 'next/image'; | ||
|
||
const iconMap = { | ||
'Amazon Lightsail': '/lightsail.png', | ||
'Railway': '/railway.png', | ||
'Civo Compute Cloud': '/civo.png', | ||
'DigitalOcean Droplet': '/digitalocean.png', | ||
'Kamatera Cloud': '/kamatera.png', | ||
}; | ||
|
||
|
||
export function DeploymentCards({ items }) { | ||
return ( | ||
<> | ||
<div className="deployment-cards"> | ||
{items.map(({ title, link, description }) => { | ||
const isExternal = link.startsWith('https://'); | ||
const iconSrc = iconMap[title] || '/default-icon.png'; // Default icon if not found | ||
|
||
return ( | ||
<div | ||
key={title} | ||
className={`card${isExternal ? ' external' : ''}`} | ||
> | ||
<a href={link} target={isExternal ? '_blank' : undefined} rel="noopener noreferrer" className="card-link-wrapper"> | ||
<div className="card-icon-container"> | ||
{iconSrc && <div className="card-icon"><Image src={iconSrc} alt={title} width={32} height={32} /></div>} {/* Reduced icon size */} | ||
</div> | ||
<h3 className="card-title">{title}</h3> | ||
{description && <p className="card-description">{description}</p>} | ||
<p className="card-url">{new URL(link).hostname.replace('www.', '')}</p> | ||
</a> | ||
</div> | ||
); | ||
})} | ||
</div> | ||
|
||
<style jsx>{` | ||
.deployment-cards { | ||
margin-top: 24px; | ||
display: grid; | ||
grid-template-columns: 1fr; | ||
gap: 16px; | ||
} | ||
@media (min-width: 768px) { | ||
.deployment-cards { | ||
grid-template-columns: 1fr 1fr; | ||
} | ||
} | ||
.card { | ||
background-color: #222222; | ||
border-radius: 8px; | ||
padding: 16px; | ||
transition: background-color 0.3s; | ||
position: relative; | ||
color: #ffffff; | ||
/* Make the card a flex container */ | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; /* Center horizontally */ | ||
justify-content: center; /* Center vertically */ | ||
height: 100%; /* Fill the height of the grid cell */ | ||
} | ||
.card:hover { | ||
background-color: #333333; | ||
} | ||
.card.external::after { | ||
content: "↗"; | ||
position: absolute; | ||
top: 12px; /* Adjusted position */ | ||
right: 12px; /* Adjusted position */ | ||
color: #ffffff; | ||
font-size: 0.7em; /* Reduced size */ | ||
opacity: 0.8; /* Slightly faded */ | ||
} | ||
.card-link-wrapper { | ||
display: flex; | ||
flex-direction: column; | ||
align-items:center; | ||
color: inherit; | ||
text-decoration: none; | ||
width:100%; /* Important: make link wrapper take full width */ | ||
} | ||
.card-icon-container{ | ||
display:flex; | ||
justify-content:center; | ||
width: 100%; | ||
margin-bottom: 8px; /* Space between icon and title */ | ||
} | ||
.card-icon { | ||
display: block; | ||
margin: 0 auto; | ||
} | ||
.card-title { | ||
font-weight: 600; | ||
margin-bottom: 4px; | ||
font-size: 16px; | ||
text-align: center; | ||
color: #f0f0f0; /* Lighter title color if needed */ | ||
} | ||
.card-description { | ||
margin-bottom: 0; | ||
font-size: 13px; | ||
color: #aaaaaa; | ||
text-align: center; | ||
line-height: 1.4; | ||
} | ||
.card-url { | ||
margin-top: 8px; /*Keep space consistent */ | ||
font-size: 11px; | ||
color: #777777; | ||
text-align: center; | ||
font-family: monospace; | ||
} | ||
`}</style> | ||
</> | ||
); | ||
} |
Oops, something went wrong.