hugging2021 commited on
Commit
4faf550
1 Parent(s): 120c05f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -23
Dockerfile CHANGED
@@ -1,31 +1,29 @@
1
- # Use an appropriate base image with Python and CUDA support if needed
2
- FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
3
 
4
- # Set working directory
5
- WORKDIR /app
6
 
7
- # Copy requirements file
 
 
8
 
9
- COPY requirements.txt .
10
- COPY extensions/openai/requirements.txt .
 
 
11
 
12
- # Install dependencies
13
- RUN pip install --upgrade pip \
14
- && pip install -r extensions/openai/requirements.txt \
15
- && pip install -r requirements.txt
16
 
17
- # Clone the repository
 
18
 
19
- RUN git clone https://github.com/oobabooga/text-generation-webui
 
20
 
21
- # Set working directory to the cloned repository
22
- WORKDIR /app/text-generation-webui
23
 
24
- # Download the model
25
- RUN python download-model.py https://huggingface.co/DanielAWrightGabrielAI/mpt-7b-storywriter-4bit-128g-65kTokens-CPU
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"