Create Dockerfile
Browse files- Dockerfile +45 -0
Dockerfile
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.10.13-slim-bullseye
|
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 |
+
|
14 |
+
RUN useradd -m -u 1000 user
|
15 |
+
USER user
|
16 |
+
ENV HOME=/home/user \
|
17 |
+
PATH=/home/user/.local/bin:${PATH}
|
18 |
+
WORKDIR ${HOME}/app
|
19 |
+
|
20 |
+
RUN pip install --no-cache-dir -U pip setuptools wheel && \
|
21 |
+
pip install "huggingface-hub" "hf-transfer" "gradio[oauth]>=4.28.0" "gradio_huggingfacehub_search==0.0.7" "APScheduler" \
|
22 |
+
bitsandbytes transformers
|
23 |
+
|
24 |
+
COPY --chown=1000 . ${HOME}/app
|
25 |
+
RUN git clone https://github.com/arcee-ai/mergekit.git && \
|
26 |
+
cd mergekit && \
|
27 |
+
pip install --upgrade pip && \
|
28 |
+
pip install -e .
|
29 |
+
|
30 |
+
ENV PYTHONPATH=${HOME}/app \
|
31 |
+
PYTHONUNBUFFERED=1 \
|
32 |
+
HF_HUB_ENABLE_HF_TRANSFER=1 \
|
33 |
+
GRADIO_ALLOW_FLAGGING=never \
|
34 |
+
GRADIO_NUM_PORTS=1 \
|
35 |
+
GRADIO_SERVER_NAME=0.0.0.0 \
|
36 |
+
GRADIO_THEME=huggingface \
|
37 |
+
TQDM_POSITION=-1 \
|
38 |
+
TQDM_MININTERVAL=1 \
|
39 |
+
SYSTEM=spaces \
|
40 |
+
LD_LIBRARY_PATH=/usr/local/cuda/lib64:${LD_LIBRARY_PATH} \
|
41 |
+
PATH=/usr/local/nvidia/bin:${PATH}
|
42 |
+
|
43 |
+
|
44 |
+
ENTRYPOINT /bin/bash start.sh
|
45 |
+
|