Skip to content

Commit

Permalink
jamie traefik labels
Browse files Browse the repository at this point in the history
  • Loading branch information
Evanfeenstra committed Oct 23, 2024
1 parent d8b8e4d commit 124cba8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/images/jamie.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use super::traefik::traefik_labels;
use super::*;
use crate::config::Node;
use crate::images::llama::LlamaImage;
Expand Down Expand Up @@ -113,14 +114,17 @@ fn jamie(node: &JamieImage, mongo: &MongoImage, llama_opt: &Option<LlamaImage>)
// mongo.http_port
// )];

let c = Config {
let mut c = Config {
image: Some(format!("{}:{}", image, node.version)),
hostname: Some(domain(&name)),
exposed_ports: exposed_ports(ports.clone()),
env: Some(env),
host_config: host_config(&name, ports, root_vol, None, None),
..Default::default()
};
if let Some(host) = &node.host {
c.labels = Some(traefik_labels(&node.name, &host, &node.http_port, false))
}
c
}

Expand Down
4 changes: 3 additions & 1 deletion src/images/llama.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ pub struct LlamaImage {
const DEFAULT_MODEL: &str = "llama-2-7b.Q4_K_M.gguf";
const VERSION: &str = "server-cuda";

// pwd: /home/admin/sphinx-swarm

impl LlamaImage {
pub fn new(name: &str, port: &str) -> Self {
Self {
name: name.to_string(),
port: port.to_string(),
model: DEFAULT_MODEL.to_string(),
host: None,
pwd: None,
pwd: None, // /home/admin/sphinx-swarm
links: Vec::new(),
}
}
Expand Down

0 comments on commit 124cba8

Please sign in to comment.