Skip to content

Commit cddd097

Browse files
committed
2 parents 066649f + f720e96 commit cddd097

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

backendai/Dockerfile.cli-ubuntu19.04

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
FROM ubuntu:19.04
2+
3+
RUN apt-get update && \
4+
apt-get install -y \
5+
wget \
6+
vim-tiny zip unzip \
7+
python3-pip && \
8+
apt-get clean && \
9+
rm -rf /var/lib/apt/lists/
10+
11+
ENV PYTHONUNBUFFERED=1 \
12+
PATH=/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
13+
LANG=C.UTF-8
14+
15+
RUN pip3 install --no-cache-dir -U setuptools && \
16+
pip3 install --no-cache-dir backend.ai-client && \
17+
rm -rf /root/.cache && \
18+
rm -f /tmp/*.whl
19+
RUN wget https://github.com/tsl0922/ttyd/releases/download/1.5.1/ttyd_linux.x86_64 -O /usr/local/bin/ttyd
20+
COPY backendai_repl.sh /usr/local/bin/backendai_repl
21+
RUN chmod 755 /usr/local/bin/ttyd /usr/local/bin/backendai_repl
22+
23+
# Backend.AI specifics
24+
LABEL ai.backend.kernelspec="1" \
25+
ai.backend.envs.corecount="OPENBLAS_NUM_THREADS,OMP_NUM_THREADS,NPROC" \
26+
ai.backend.features="batch query uid-match user-input" \
27+
ai.backend.resource.min.cpu="1" \
28+
ai.backend.resource.min.mem="128m" \
29+
ai.backend.base-distro="ubuntu16.04" \
30+
ai.backend.runtime-type="backendai" \
31+
ai.backend.runtime-path="/usr/local/bin/ttyd" \
32+
ai.backend.service-ports="ttyd:http:8090"
33+
34+
WORKDIR /home/work
35+
36+
COPY policy.yml /etc/backend.ai/jail/policy.yml
37+
38+
# vim: ft=dockerfile

backendai/backendai_repl.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
while read -p "Backend.AI >> " input
3+
do
4+
backend.ai ${input}
5+
done

0 commit comments

Comments
 (0)