cyfyifanchen commited on
Commit
990d834
·
verified ·
1 Parent(s): bdeaec2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -9
Dockerfile CHANGED
@@ -3,13 +3,14 @@ FROM ghcr.io/ten-framework/ten_agent_build:0.6.1-cuda
3
  # install huggingface cli
4
  RUN pip install "huggingface_hub[cli]" hf_transfer
5
 
6
- # install vllm
7
- RUN pip install vllm
 
 
8
 
9
  # install node and npm for demo
10
  ENV NVM_DIR /usr/local/nvm
11
  RUN mkdir -p $NVM_DIR
12
- # Create a script file sourced by both interactive and non-interactive bash shells
13
  ENV BASH_ENV /usr/local/nvm/.nvm_bash_env
14
  RUN touch "${BASH_ENV}"
15
  RUN echo '. "${BASH_ENV}"' >> ~/.bashrc
@@ -17,10 +18,10 @@ RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | P
17
  RUN . $NVM_DIR/nvm.sh && nvm install node
18
 
19
  # install TEN-Agent
20
- RUN git clone -b feature/shisa https://github.com/TEN-framework/ten_framework.git /ten_framework
21
  RUN ln -sf /ten_framework/ai_agents /app
22
  RUN cd /app && task use AGENT=agents/examples/huggingface && cd agents && ./scripts/package.sh
23
- #RUN . $NVM_DIR/nvm.sh && cd /app/playground && npm i
24
  RUN . $NVM_DIR/nvm.sh && cd /app/demo && npm i
25
 
26
  # Set up a new user named "user" with user ID 1000
@@ -29,13 +30,12 @@ RUN useradd -m -u 1000 user
29
  # Fix permission of /app
30
  RUN chown -R user /app /ten_framework
31
 
32
-
33
  # Switch to the "user" user
34
  USER user
35
 
36
  # Set home to the user's home directory
37
  ENV HOME=/home/user \
38
- PATH=/home/user/.local/bin:$PATH
39
 
40
  # Set the working directory to the user's home directory
41
  WORKDIR $HOME/app
@@ -50,6 +50,4 @@ COPY --chown=user entrypoint.sh $HOME/app/
50
  # auto init nvm for the "user" user
51
  RUN echo '. "${BASH_ENV}"' >> $HOME/.bashrc
52
 
53
-
54
-
55
  ENTRYPOINT ["/home/user/app/entrypoint.sh"]
 
3
  # install huggingface cli
4
  RUN pip install "huggingface_hub[cli]" hf_transfer
5
 
6
+ # ---- upgrading transformers and vllm ----
7
+ RUN pip install --no-cache-dir --upgrade pip \
8
+ && pip install --no-cache-dir --pre git+https://github.com/huggingface/transformers.git@main \
9
+ && pip install --no-cache-dir --pre vllm
10
 
11
  # install node and npm for demo
12
  ENV NVM_DIR /usr/local/nvm
13
  RUN mkdir -p $NVM_DIR
 
14
  ENV BASH_ENV /usr/local/nvm/.nvm_bash_env
15
  RUN touch "${BASH_ENV}"
16
  RUN echo '. "${BASH_ENV}"' >> ~/.bashrc
 
18
  RUN . $NVM_DIR/nvm.sh && nvm install node
19
 
20
  # install TEN-Agent
21
+ RUN git clone -b feature/shisa https://github.com/TEN-framework/ten_framework.git /ten_framework
22
  RUN ln -sf /ten_framework/ai_agents /app
23
  RUN cd /app && task use AGENT=agents/examples/huggingface && cd agents && ./scripts/package.sh
24
+ # RUN . $NVM_DIR/nvm.sh && cd /app/playground && npm i
25
  RUN . $NVM_DIR/nvm.sh && cd /app/demo && npm i
26
 
27
  # Set up a new user named "user" with user ID 1000
 
30
  # Fix permission of /app
31
  RUN chown -R user /app /ten_framework
32
 
 
33
  # Switch to the "user" user
34
  USER user
35
 
36
  # Set home to the user's home directory
37
  ENV HOME=/home/user \
38
+ PATH=/home/user/.local/bin:$PATH
39
 
40
  # Set the working directory to the user's home directory
41
  WORKDIR $HOME/app
 
50
  # auto init nvm for the "user" user
51
  RUN echo '. "${BASH_ENV}"' >> $HOME/.bashrc
52
 
 
 
53
  ENTRYPOINT ["/home/user/app/entrypoint.sh"]