Spaces:
Running
on
L4
Running
on
L4
untested Dockerfile
Browse files- Dockerfile +56 -0
- start.sh +1 -0
Dockerfile
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM ubuntu:22.04
|
2 |
+
|
3 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
4 |
+
RUN apt-get update && \
|
5 |
+
apt-get upgrade -y && \
|
6 |
+
apt-get install -y --no-install-recommends \
|
7 |
+
git \
|
8 |
+
git-lfs \
|
9 |
+
wget \
|
10 |
+
curl \
|
11 |
+
# python build dependencies \
|
12 |
+
build-essential \
|
13 |
+
libssl-dev \
|
14 |
+
zlib1g-dev \
|
15 |
+
libbz2-dev \
|
16 |
+
libreadline-dev \
|
17 |
+
libsqlite3-dev \
|
18 |
+
libncursesw5-dev \
|
19 |
+
xz-utils \
|
20 |
+
tk-dev \
|
21 |
+
libxml2-dev \
|
22 |
+
libxmlsec1-dev \
|
23 |
+
libffi-dev \
|
24 |
+
liblzma-dev \
|
25 |
+
ffmpeg \
|
26 |
+
|
27 |
+
RUN useradd -m -u 1000 user
|
28 |
+
USER user
|
29 |
+
ENV HOME=/home/user \
|
30 |
+
PATH=/home/user/.local/bin:${PATH}
|
31 |
+
WORKDIR ${HOME}/app
|
32 |
+
|
33 |
+
RUN curl https://pyenv.run | bash
|
34 |
+
ENV PATH=${HOME}/.pyenv/shims:${HOME}/.pyenv/bin:${PATH}
|
35 |
+
ARG PYTHON_VERSION=3.11
|
36 |
+
RUN pyenv install ${PYTHON_VERSION} && \
|
37 |
+
pyenv global ${PYTHON_VERSION} && \
|
38 |
+
pyenv rehash && \
|
39 |
+
pip install --no-cache-dir -U pip setuptools wheel && \
|
40 |
+
pip install "huggingface-hub" "hf-transfer" "gradio[oauth]>=4.28.0" "gradio_huggingfacehub_search==0.0.7" "APScheduler" && \
|
41 |
+
pip install --pre -U -f https://mlc.ai/wheels mlc-llm-nightly-cpu mlc-ai-nightly-cpu
|
42 |
+
|
43 |
+
COPY --chown=1000 . ${HOME}/app
|
44 |
+
|
45 |
+
ENV PYTHONPATH=${HOME}/app \
|
46 |
+
PYTHONUNBUFFERED=1 \
|
47 |
+
HF_HUB_ENABLE_HF_TRANSFER=1 \
|
48 |
+
GRADIO_ALLOW_FLAGGING=never \
|
49 |
+
GRADIO_NUM_PORTS=1 \
|
50 |
+
GRADIO_SERVER_NAME=0.0.0.0 \
|
51 |
+
GRADIO_THEME=huggingface \
|
52 |
+
TQDM_POSITION=-1 \
|
53 |
+
TQDM_MININTERVAL=1 \
|
54 |
+
SYSTEM=spaces
|
55 |
+
|
56 |
+
ENTRYPOINT /bin/sh start.sh
|
start.sh
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
python app.py
|