Spaces:
Runtime error
Runtime error
gfjiogopdfgdfs
commited on
Commit
•
90dab9b
1
Parent(s):
eab2244
Create Dockerfile
Browse files- Dockerfile +28 -0
Dockerfile
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM nvidia/cuda:11.8.0-devel-ubuntu22.04
|
2 |
+
# Install necessary packages
|
3 |
+
RUN apt update && apt install git build-essential libopenblas-dev wget python3-pip -y
|
4 |
+
RUN apt update && apt install -y wget
|
5 |
+
RUN apt-get install -y nodejs npm
|
6 |
+
RUN npm install -g localtunnel
|
7 |
+
# Set up a new user named "user" with user ID 1000
|
8 |
+
RUN useradd -m -u 1000 user
|
9 |
+
# Switch to the "user" user
|
10 |
+
USER user
|
11 |
+
# Set home to the user's home directory
|
12 |
+
ENV HOME=/home/user \
|
13 |
+
PATH=/home/user/.local/bin:$PATH
|
14 |
+
# Set the working directory to the user's home directory
|
15 |
+
WORKDIR $HOME/app
|
16 |
+
|
17 |
+
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
18 |
+
COPY --chown=user . $HOME/app
|
19 |
+
RUN python3 -m pip install aphrodite-engine
|
20 |
+
RUN pip install huggingface-hub hf-transfer
|
21 |
+
ENV HF_HUB_ENABLE_HF_TRANSFER=1
|
22 |
+
RUN huggingface-cli download TheBloke/goliath-120b-gptq --local-dir ~/goliath-gptq --local-dir-use-symlinks False --cache-dir ~/cache
|
23 |
+
RUN echo "#!/bin/bash" > startup.sh
|
24 |
+
RUN echo "lt --port 7860 &" >> startup.sh
|
25 |
+
RUN echo "public_ip=\$(wget -qO- https://loca.lt/mytunnelpassword)" >> startup.sh
|
26 |
+
RUN echo "echo \"Public IP: \$public_ip\"" >> startup.sh
|
27 |
+
RUN chmod +x startup.sh
|
28 |
+
CMD /bin/bash -c "./startup.sh && /bin/python3 -m aphrodite.endpoints.kobold.api_server $ENGINE_ARGS --port 7860 --model ~/goliath-gptq"
|