hugging2021
commited on
Commit
•
4faf550
1
Parent(s):
120c05f
Update Dockerfile
Browse files- Dockerfile +21 -23
Dockerfile
CHANGED
@@ -1,31 +1,29 @@
|
|
1 |
-
#
|
2 |
-
FROM
|
3 |
|
4 |
-
#
|
5 |
-
WORKDIR
|
6 |
|
7 |
-
#
|
|
|
|
|
8 |
|
9 |
-
|
10 |
-
|
|
|
|
|
11 |
|
12 |
-
#
|
13 |
-
RUN
|
14 |
-
&& pip install -r extensions/openai/requirements.txt \
|
15 |
-
&& pip install -r requirements.txt
|
16 |
|
17 |
-
#
|
|
|
18 |
|
19 |
-
|
|
|
20 |
|
21 |
-
#
|
22 |
-
|
23 |
|
24 |
-
#
|
25 |
-
|
26 |
-
|
27 |
-
# Expose the port the web UI will run on
|
28 |
-
EXPOSE 7860
|
29 |
-
|
30 |
-
# Define the command to run the web UI
|
31 |
-
CMD ["python", "server.py", "--share", "--model", "/app/text-generation-webui/models/DanielAWrightGabrielAI_mpt-7b-storywriter-4bit-128g-65kTokens-CPU", "--tensorcores", "--trust-remote-code", "--api", "--public-api"
|
|
|
1 |
+
# Use a base image with Python
|
2 |
+
FROM python:3.10-slim-buster
|
3 |
|
4 |
+
# Set working directory
|
5 |
+
WORKDIR /app
|
6 |
|
7 |
+
# Copy requirements file
|
8 |
+
COPY requirements.txt .
|
9 |
+
COPY extensions/openai/requirements.txt .
|
10 |
|
11 |
+
# Install dependencies
|
12 |
+
RUN pip install --upgrade pip \
|
13 |
+
&& pip install -r extensions/openai/requirements.txt \
|
14 |
+
&& pip install -r requirements.txt
|
15 |
|
16 |
+
# Clone the repository
|
17 |
+
RUN git clone https://github.com/oobabooga/text-generation-webui
|
|
|
|
|
18 |
|
19 |
+
# Set working directory to the cloned repository
|
20 |
+
WORKDIR /app/text-generation-webui
|
21 |
|
22 |
+
# Download the model
|
23 |
+
RUN python download-model.py https://huggingface.co/DanielAWrightGabrielAI/mpt-7b-storywriter-4bit-128g-65kTokens-CPU
|
24 |
|
25 |
+
# Expose the port the web UI will run on
|
26 |
+
EXPOSE 7860
|
27 |
|
28 |
+
# Define the command to run the web UI (remove --tensorcores flag)
|
29 |
+
CMD ["python", "server.py", "--share", "--model", "/app/text-generation-webui/models/DanielAWrightGabrielAI_mpt-7b-storywriter-4bit-128g-65kTokens-CPU", "--trust-remote-code", "--api", "--public-api"
|
|
|
|
|
|
|
|
|
|
|
|