Spaces:
Sleeping
Sleeping
Commit
•
0d3c10c
1
Parent(s):
8bc10ca
Add original Docker file
Browse filesCo-authored-by: Andrey Avtomonov <[email protected]>
- Dockerfile +46 -0
Dockerfile
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM docker.io/giskardai/giskard:hf
|
2 |
+
|
3 |
+
USER root
|
4 |
+
RUN usermod -u 1000 giskard
|
5 |
+
RUN chown -R giskard \
|
6 |
+
/var/run/postgresql \
|
7 |
+
/usr/bin/supervisord \
|
8 |
+
/var/lib/nginx \
|
9 |
+
/var/log/supervisor \
|
10 |
+
"${GSK_USER_HOME}" \
|
11 |
+
"${GSK_DIST_PATH}"
|
12 |
+
|
13 |
+
RUN apt-get update && \
|
14 |
+
apt-get install -y --no-install-recommends make build-essential libssl-dev zlib1g-dev libbz2-dev \
|
15 |
+
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
|
16 |
+
xz-utils tk-dev libffi-dev liblzma-dev
|
17 |
+
|
18 |
+
USER giskard
|
19 |
+
|
20 |
+
ENV PYENV_ROOT="/home/giskard/.pyenv"
|
21 |
+
ENV PATH="${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:${PATH}"
|
22 |
+
RUN curl https://pyenv.run | bash
|
23 |
+
|
24 |
+
COPY --chown=giskard python-version.txt /home/giskard
|
25 |
+
RUN bash -c ' \
|
26 |
+
pyenv install $(cat /home/giskard/python-version.txt) && \
|
27 |
+
pyenv global $(cat /home/giskard/python-version.txt) \
|
28 |
+
'
|
29 |
+
|
30 |
+
COPY --chown=giskard requirements.txt /home/giskard
|
31 |
+
RUN pip install --upgrade pip && \
|
32 |
+
pip install -r /home/giskard/requirements.txt
|
33 |
+
|
34 |
+
# Install giskard library built by the original Dockerfile
|
35 |
+
RUN WHEEL=$(ls $GSK_DIST_PATH/python-client/giskard*.whl) && pip install $WHEEL\[server\]
|
36 |
+
|
37 |
+
# Don't ask for a license when running on HuggingFace, include a pre-generated free one
|
38 |
+
COPY --chown=giskard license-huggingface.lic /home/giskard/datadir/license.lic
|
39 |
+
|
40 |
+
# Only changed the original supervisord.conf to redirect logs to stdout
|
41 |
+
COPY --chown=giskard supervisord.conf $GSK_DIST_PATH
|
42 |
+
|
43 |
+
# Internal workr doesn't download resource, but takes them directly from projects, so no cache
|
44 |
+
ENV GSK_CACHE_DIR=projects
|
45 |
+
|
46 |
+
EXPOSE 7860
|