-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
137 lines (128 loc) · 4.04 KB
/
Copy pathdocker-compose.yml
File metadata and controls
137 lines (128 loc) · 4.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
---
services:
ssh-keygen:
image: alpine:3.23.0
command:
- sh
- -c
- |
apk add --no-cache openssh-keygen
if [ ! -f /keys/id_rsa ]; then
echo "Generating SSH keys for demo..."
ssh-keygen -t rsa -b 2048 -f /keys/id_rsa -N ""
chmod 600 /keys/id_rsa
chmod 644 /keys/id_rsa.pub
echo "✓ SSH keys generated in .ssh-keys/"
else
echo "✓ Using existing SSH keys from .ssh-keys/"
fi
volumes:
- ./.ssh-keys:/keys
web-terminal:
image: ghcr.io/inference-gateway/cli:latest
command:
- chat
- --web
ports:
- "3000:3000"
environment:
INFER_WEB_HOST: 0.0.0.0
INFER_WEB_PORT: 3000
INFER_GATEWAY_URL: http://inference-gateway:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./.ssh-keys:/home/infer/.ssh:ro
- ./config.yaml:/home/infer/.infer/config.yaml:ro
networks:
- infer-network
depends_on:
ssh-keygen:
condition: service_completed_successfully
inference-gateway:
condition: service_started
remote-ubuntu:
condition: service_started
restart: unless-stopped
inference-gateway:
image: ghcr.io/inference-gateway/inference-gateway:latest
environment:
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
CLOUDFLARE_API_KEY: ${CLOUDFLARE_API_KEY}
COHERE_API_KEY: ${COHERE_API_KEY}
GROQ_API_KEY: ${GROQ_API_KEY}
OPENAI_API_KEY: ${OPENAI_API_KEY}
DEEPSEEK_API_KEY: ${DEEPSEEK_API_KEY}
GOOGLE_API_KEY: ${GOOGLE_API_KEY}
MISTRAL_API_KEY: ${MISTRAL_API_KEY}
networks:
- infer-network
restart: unless-stopped
remote-ubuntu:
image: ubuntu:24.04
command:
- sh
- -c
- |
apt-get update && apt-get install -y openssh-server sudo curl
mkdir -p /run/sshd
useradd -m -s /bin/bash developer
echo 'developer ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
mkdir -p /home/developer/.ssh
if [ -f /ssh-keys/id_rsa.pub ]; then
cat /ssh-keys/id_rsa.pub > /home/developer/.ssh/authorized_keys
chown -R developer:developer /home/developer/.ssh
chmod 700 /home/developer/.ssh
chmod 600 /home/developer/.ssh/authorized_keys
echo "✓ SSH public key installed for developer user"
else
echo "✗ No SSH public key found in /ssh-keys/"
fi
/usr/sbin/sshd -D -e
volumes:
- ./.ssh-keys:/ssh-keys:ro
depends_on:
ssh-keygen:
condition: service_completed_successfully
inference-gateway:
condition: service_started
networks:
- infer-network
restart: unless-stopped
remote-alpine:
image: alpine:3.23.0
command:
- sh
- -c
- |
apk add --no-cache openssh-server sudo curl bash
ssh-keygen -A
sed -i 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/' /etc/ssh/sshd_config
sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin no/' /etc/ssh/sshd_config
adduser -D -s /bin/bash developer
passwd -u developer
echo 'developer ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
mkdir -p /home/developer/.ssh
if [ -f /ssh-keys/id_rsa.pub ]; then
cat /ssh-keys/id_rsa.pub > /home/developer/.ssh/authorized_keys
chown -R developer:developer /home/developer/.ssh
chmod 700 /home/developer/.ssh
chmod 600 /home/developer/.ssh/authorized_keys
echo "✓ SSH public key installed for developer user"
else
echo "✗ No SSH public key found in /ssh-keys/"
fi
/usr/sbin/sshd -D -e
volumes:
- ./.ssh-keys:/ssh-keys:ro
depends_on:
ssh-keygen:
condition: service_completed_successfully
inference-gateway:
condition: service_started
networks:
- infer-network
restart: unless-stopped
networks:
infer-network:
driver: bridge