gfjiogopdfgdfs commited on
Commit
186058d
1 Parent(s): 42b8a72

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -22
Dockerfile CHANGED
@@ -1,5 +1,4 @@
1
  FROM nvidia/cuda:11.8.0-devel-ubuntu22.04
2
- # Install necessary packages
3
  RUN apt update && apt install -y \
4
  git \
5
  build-essential \
@@ -7,42 +6,25 @@ RUN apt update && apt install -y \
7
  wget \
8
  python3-pip \
9
  nodejs \
10
- npm
11
 
12
- # Set up a new user named "user" with user ID 1000
13
  RUN useradd -m -u 1000 user
14
 
15
- # Switch to the "user" user
16
  USER user
17
 
18
- # Set home to the user's home directory and adjust PATH
19
  ENV HOME=/home/user \
20
  PATH=/home/user/.local/bin:$PATH
21
 
22
- # Set the working directory to the user's home directory
23
- WORKDIR $HOME/app
24
 
25
- # Copy the current directory contents into the container at $HOME/app setting the owner to the user
26
  COPY --chown=user . $HOME/app
27
 
28
- # Install aphrodite-engine and clone repository
29
  RUN python3 -m pip install aphrodite-engine
30
-
31
- # Install Hugging Face libraries
32
  RUN pip install huggingface-hub hf-transfer
33
 
34
- # Set environment variable to enable hf-transfer
35
  ENV HF_HUB_ENABLE_HF_TRANSFER=1
 
36
 
37
- # Attempt to download goliath model - this line might cause delays due to model size.
38
- RUN huggingface-cli download TheBloke/goliath-120b-gptq --local-dir $HOME/goliath-gptq --local-dir-use-symlinks False --cache-dir $HOME/cache
39
 
40
- # Set environment variable for a bypass server (not sure how this is being used in your application)
41
- ENV BYPASS_SERVER=http://localhost:8080
42
-
43
- # Expose the port for the API server
44
  EXPOSE 7860
45
-
46
- # Run the aphrodite engine API server
47
- CMD /bin/bash -c "/bin/python3 -m aphrodite.endpoints.kobold.api_server $ENGINE_ARGS --port 7860 --model ~/goliath-gptq"
48
-
 
1
  FROM nvidia/cuda:11.8.0-devel-ubuntu22.04
 
2
  RUN apt update && apt install -y \
3
  git \
4
  build-essential \
 
6
  wget \
7
  python3-pip \
8
  nodejs \
9
+ npm
10
 
 
11
  RUN useradd -m -u 1000 user
12
 
 
13
  USER user
14
 
 
15
  ENV HOME=/home/user \
16
  PATH=/home/user/.local/bin:$PATH
17
 
 
 
18
 
19
+ WORKDIR $HOME/app
20
  COPY --chown=user . $HOME/app
21
 
 
22
  RUN python3 -m pip install aphrodite-engine
 
 
23
  RUN pip install huggingface-hub hf-transfer
24
 
 
25
  ENV HF_HUB_ENABLE_HF_TRANSFER=1
26
+ RUN huggingface-cli download TheBloke/TinyLlama-1.1B-Chat-v1.0-GPTQ --local-dir $HOME/goliath-gptq --local-dir-use-symlinks False --cache-dir $HOME/cache
27
 
 
 
28
 
 
 
 
 
29
  EXPOSE 7860
30
+ CMD ["sh", "-c", "python3", "$HOME/app/aphrodite-engine/aphrodite/endpoints/kobold/api_server.py", "$ENGINE_ARGS", "--port", "7860", "--host","0.0.0.0", "--model", "$HOME/goliath-gptq"]