Update Dockerfile
Browse files- Dockerfile +18 -20
Dockerfile
CHANGED
|
@@ -1,28 +1,26 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
-
# Install system dependencies
|
| 4 |
-
RUN apt-get update && \
|
| 5 |
-
apt-get install -y \
|
| 6 |
build-essential \
|
| 7 |
-
python3-pip \
|
| 8 |
-
cmake \
|
| 9 |
git \
|
| 10 |
-
|
| 11 |
-
rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
-
#
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
RUN pip3 install --upgrade pip && \
|
| 19 |
-
pip3 install llama-cpp-python huggingface-hub[hf_transfer] gradio duckduckgo-search
|
| 20 |
|
| 21 |
-
#
|
| 22 |
-
COPY app.py /app.py
|
| 23 |
-
|
| 24 |
-
# Expose the Gradio port
|
| 25 |
EXPOSE 7860
|
| 26 |
|
| 27 |
-
|
| 28 |
-
CMD ["python3", "/app.py"]
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
|
| 3 |
+
# Install system dependencies for build-essential (needed for some python libs)
|
| 4 |
+
RUN apt-get update && apt-get install -y \
|
|
|
|
| 5 |
build-essential \
|
|
|
|
|
|
|
| 6 |
git \
|
| 7 |
+
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
| 8 |
|
| 9 |
+
# Install Hugging Face stack and Search
|
| 10 |
+
# bitsandbytes + accelerate allows running the model on lower RAM
|
| 11 |
+
RUN pip install --no-cache-dir \
|
| 12 |
+
torch \
|
| 13 |
+
transformers \
|
| 14 |
+
accelerate \
|
| 15 |
+
bitsandbytes \
|
| 16 |
+
gradio \
|
| 17 |
+
duckduckgo-search \
|
| 18 |
+
sentencepiece
|
| 19 |
|
| 20 |
+
WORKDIR /app
|
| 21 |
+
COPY app.py .
|
|
|
|
|
|
|
| 22 |
|
| 23 |
+
# Expose Gradio port
|
|
|
|
|
|
|
|
|
|
| 24 |
EXPOSE 7860
|
| 25 |
|
| 26 |
+
CMD ["python", "app.py"]
|
|
|