Skip to content

Commit 54386f2

Browse files
committed
Changes in docker image building.
2 parents 51fad77 + 31dd59e commit 54386f2

File tree

3 files changed

+19
-9
lines changed

3 files changed

+19
-9
lines changed

Dockerfile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
FROM python:3.13.7-slim-trixie
22

33
ARG version=prod
4+
ARG GIT_REF=main
45

56
LABEL authors="RadLab"
67
LABEL version=$version
78

8-
# If used build.sh ENV is overwrited by default or set value
9-
ENV branch=main
10-
119
ENV LLM_PROXY_API_MINIMUM=1
1210

13-
RUN apt-get update && apt-get install -y supervisor htop curl htop jq git vim cron && rm -rf /var/lib/apt/lists/*
11+
RUN apt-get update && apt-get upgrade -y && apt-get install -y supervisor htop curl htop jq git vim cron && rm -rf /var/lib/apt/lists/*
1412

1513
WORKDIR /srv/
1614

17-
RUN git clone -b ${branch} https://github.com/radlab-dev-group/llm-router.git && \
18-
cd /srv/llm-router && \
15+
16+
RUN git clone https://github.com/radlab-dev-group/llm-router.git && \
17+
cd /srv/llm-router && \
18+
git checkout ${GIT_REF} && \
1919
cat .git/HEAD > .version && git log -1 | head -1 >> .version && \
2020
rm -rf .git .gitignore
2121

2222
WORKDIR /srv/llm-router
2323

24-
RUN pip3 install -r requirements.txt
24+
RUN pip3 install --upgrade pip && pip3 install -r requirements.txt
2525

2626
RUN pip3 install git+https://github.com/radlab-dev-group/ml-utils.git
2727

28-
RUN chmod +x run-rest-api.sh
28+
RUN chmod +x run-rest-api.sh && chmod +x entrypoint.sh
2929

30-
CMD ["/srv/llm-router/run-rest-api.sh"]
30+
ENTRYPOINT ["/srv/llm-router/entrypoint.sh"]

entrypoint.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
if [ "$1" = "SLEEP" ]; then
4+
echo "Debug mode"
5+
sleep infinity
6+
else
7+
echo "Starting application..."
8+
exec ./run-rest-api.sh
9+
fi

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
flask
22
gunicorn
3+
redis
34

45
# gevent

0 commit comments

Comments
 (0)