hugging2021
commited on
Commit
•
dc00d9f
1
Parent(s):
ec4ea49
Update Dockerfile
Browse files- Dockerfile +24 -24
Dockerfile
CHANGED
@@ -1,31 +1,31 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
WORKDIR /app
|
6 |
|
7 |
-
# Copy requirements file
|
8 |
-
COPY requirements.txt .
|
9 |
-
|
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 |
-
#
|
22 |
-
|
23 |
|
24 |
-
#
|
25 |
-
|
|
|
26 |
|
27 |
-
# Expose the port the web UI
|
28 |
EXPOSE 7860
|
29 |
|
30 |
-
#
|
31 |
-
CMD ["python", "server.py"
|
|
|
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"]
|