hugging2021 commited on
Commit
dc00d9f
1 Parent(s): ec4ea49

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -24
Dockerfile CHANGED
@@ -1,31 +1,31 @@
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 apt install gdal-bin libgdal-dev
13
- RUN pip install cupy-cuda12x==12.2.0
14
- RUN pip install --upgrade pip \
15
- && pip install -r extensions/openai/requirements.txt \
16
- && pip install -r requirements.txt
17
-
18
- # Clone the repository
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 (remove --tensorcores flag)
31
- 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"
 
1
+ FROM python:3.11-slim-buster
2
+
3
+ # Install system dependencies
4
+ RUN apt-get update && apt-get install -y \
5
+ git \
6
+ wget \
7
+ aria2 \
8
+ libgl1-mesa-glx \
9
+ libglib2.0-0 \
10
+ libgdal-de \
11
+ && rm -rf /var/lib/apt/lists/*
12
+
13
+ # Set the working directory
14
  WORKDIR /app
15
 
16
+ # Copy the requirements file and install dependencies
17
+ COPY requirements.txt requirements.txt
18
+ RUN pip install --no-cache-dir -r requirements.txt
 
 
 
 
 
 
 
 
 
 
19
 
20
+ # Copy the application code
21
+ COPY . .
22
 
23
+ # Set environment variables (adjust as needed)
24
+ ENV PYTHONUNBUFFERED=1
25
+ ENV LD_LIBRARY_PATH=/usr/local/lib
26
 
27
+ # Expose the port for the web UI
28
  EXPOSE 7860
29
 
30
+ # Command to start the web UI (replace launch_script with your actual script)
31
+ CMD ["python", "server.py"]