Brianpuz commited on
Commit
452e251
·
verified ·
1 Parent(s): 5f9a0f8

Change the dockerfile so that we can run the space in dev mode

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -11
Dockerfile CHANGED
@@ -9,7 +9,6 @@ RUN apt-get update && \
9
  wget \
10
  curl \
11
  cmake \
12
- libcurl4-openssl-dev \
13
  # python build dependencies \
14
  build-essential \
15
  libssl-dev \
@@ -25,17 +24,19 @@ RUN apt-get update && \
25
  libffi-dev \
26
  liblzma-dev \
27
  ffmpeg \
 
28
  nvidia-driver-570
29
 
30
  # Check if user with UID 1000 exists, if not create it
31
  RUN id -u 1000 &>/dev/null || useradd -m -u 1000 user
32
  USER 1000
33
- ENV HOME=/home/user \
34
- PATH=/home/user/.local/bin:${PATH}
35
- WORKDIR ${HOME}/app
36
 
37
- RUN curl https://pyenv.run | bash
38
- ENV PATH=${HOME}/.pyenv/shims:${HOME}/.pyenv/bin:${PATH}
 
39
  ARG PYTHON_VERSION=3.11
40
  RUN pyenv install ${PYTHON_VERSION} && \
41
  pyenv global ${PYTHON_VERSION} && \
@@ -43,13 +44,13 @@ RUN pyenv install ${PYTHON_VERSION} && \
43
  pip install --no-cache-dir -U pip setuptools wheel && \
44
  pip install "huggingface-hub" "hf-transfer" "gradio[oauth]>=4.28.0" "gradio_huggingfacehub_search==0.0.8" "APScheduler"
45
 
46
- COPY --chown=1000 . ${HOME}/app
47
- RUN git clone https://github.com/ggerganov/llama.cpp
48
- RUN pip install -r llama.cpp/requirements.txt
49
 
50
- COPY groups_merged.txt ${HOME}/app/llama.cpp/
51
 
52
- ENV PYTHONPATH=${HOME}/app \
53
  PYTHONUNBUFFERED=1 \
54
  HF_HUB_ENABLE_HF_TRANSFER=1 \
55
  GRADIO_ALLOW_FLAGGING=never \
 
9
  wget \
10
  curl \
11
  cmake \
 
12
  # python build dependencies \
13
  build-essential \
14
  libssl-dev \
 
24
  libffi-dev \
25
  liblzma-dev \
26
  ffmpeg \
27
+ libcurl4-openssl-dev \
28
  nvidia-driver-570
29
 
30
  # Check if user with UID 1000 exists, if not create it
31
  RUN id -u 1000 &>/dev/null || useradd -m -u 1000 user
32
  USER 1000
33
+ ENV HOME=/app \
34
+ PATH=/app/.local/bin:${PATH}
35
+ WORKDIR /app
36
 
37
+ RUN curl https://pyenv.run | PYENV_ROOT=/app/.pyenv bash
38
+ ENV PYENV_ROOT=/app/.pyenv \
39
+ PATH=/app/.pyenv/shims:/app/.pyenv/bin:${PATH}
40
  ARG PYTHON_VERSION=3.11
41
  RUN pyenv install ${PYTHON_VERSION} && \
42
  pyenv global ${PYTHON_VERSION} && \
 
44
  pip install --no-cache-dir -U pip setuptools wheel && \
45
  pip install "huggingface-hub" "hf-transfer" "gradio[oauth]>=4.28.0" "gradio_huggingfacehub_search==0.0.8" "APScheduler"
46
 
47
+ COPY --chown=1000 . /app
48
+ RUN git clone https://github.com/ggerganov/llama.cpp /app/llama.cpp
49
+ RUN pip install -r /app/llama.cpp/requirements.txt
50
 
51
+ COPY groups_merged.txt /app/llama.cpp/
52
 
53
+ ENV PYTHONPATH=/app \
54
  PYTHONUNBUFFERED=1 \
55
  HF_HUB_ENABLE_HF_TRANSFER=1 \
56
  GRADIO_ALLOW_FLAGGING=never \