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