gfjiogopdfgdfs commited on
Commit
de2174e
1 Parent(s): dc6f869

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -8
Dockerfile CHANGED
@@ -18,20 +18,23 @@ ENV HOME=/home/user \
18
  WORKDIR $HOME/app
19
  COPY --chown=user . $HOME/app
20
 
21
- # Install aphrodite-engine normally
22
- RUN python3 -m pip install aphrodite-engine
23
-
24
- # Clone the specific branch of aphrodite-engine
25
  RUN git clone --branch feat/exllamav2-support https://github.com/PygmalionAI/aphrodite-engine.git $HOME/aphrodite-engine
26
 
27
- # Use Python to find the installation directory of aphrodite-engine and copy the files over
28
- RUN python3 -c "import os, aphrodite; print(os.path.dirname(aphrodite.__file__))" > aphrodite_path.txt
29
- RUN APHRODITE_PATH=$(cat aphrodite_path.txt) && cp -r /home/user/aphrodite-engine/* $APHRODITE_PATH
30
 
 
31
  RUN pip install huggingface-hub hf-transfer
32
 
 
33
  ENV HF_HUB_ENABLE_HF_TRANSFER=1
 
 
34
  RUN huggingface-cli download LoneStriker/TinyLlama-1.1B-32k-Instruct-8.0bpw-h8-exl2 --local-dir $HOME/goliath-gptq --local-dir-use-symlinks False --cache-dir $HOME/cache
35
 
 
36
  EXPOSE 7860
37
- CMD /bin/bash -c "/bin/python3 -m aphrodite.endpoints.openai.api_server $ENGINE_ARGS --port 7860 --host 0.0.0.0 --model ~/goliath-gptq"
 
 
 
18
  WORKDIR $HOME/app
19
  COPY --chown=user . $HOME/app
20
 
21
+ # Clone the aphrodite-engine from the specific branch
 
 
 
22
  RUN git clone --branch feat/exllamav2-support https://github.com/PygmalionAI/aphrodite-engine.git $HOME/aphrodite-engine
23
 
24
+ # Install dependencies from the cloned repository
25
+ RUN cd $HOME/aphrodite-engine && pip install -e .
 
26
 
27
+ # Install additional dependencies
28
  RUN pip install huggingface-hub hf-transfer
29
 
30
+ # Set environment variable to enable hf-transfer
31
  ENV HF_HUB_ENABLE_HF_TRANSFER=1
32
+
33
+ # Download the model using huggingface-cli
34
  RUN huggingface-cli download LoneStriker/TinyLlama-1.1B-32k-Instruct-8.0bpw-h8-exl2 --local-dir $HOME/goliath-gptq --local-dir-use-symlinks False --cache-dir $HOME/cache
35
 
36
+ # Expose the port the API server will listen on
37
  EXPOSE 7860
38
+
39
+ # Command to run the API server
40
+ CMD ["/bin/bash", "-c", "/bin/python3 -m aphrodite.endpoints.openai.api_server $ENGINE_ARGS --port 7860 --host 0.0.0.0 --model ~/goliath-gptq"]