Spaces:
Paused
Paused
Commit
·
cc56b03
1
Parent(s):
f5146ec
Update Dockerfile
Browse files- Dockerfile +7 -22
Dockerfile
CHANGED
@@ -1,36 +1,21 @@
|
|
1 |
-
FROM
|
2 |
|
3 |
-
|
4 |
-
WORKDIR $HOME/app
|
5 |
|
6 |
-
|
7 |
-
COPY requirements.txt .
|
8 |
-
|
9 |
-
RUN apt-get update && \
|
10 |
-
apt-get install -y --no-install-recommends \
|
11 |
-
build-essential \
|
12 |
-
python3-dev \
|
13 |
-
python3-pip \
|
14 |
-
libglib2.0-0 && \
|
15 |
-
rm -rf /var/lib/apt/lists/*
|
16 |
|
|
|
|
|
17 |
RUN CMAKE_ARGS="-DLLAMA_CUBLAS=on" FORCE_CMAKE=1 pip install llama-cpp-python --no-cache-dir
|
18 |
-
|
19 |
RUN pip install --upgrade pip && \
|
20 |
-
pip install
|
21 |
-
|
22 |
-
# Copy the installed packages to a new image
|
23 |
-
FROM nvidia/cuda:10.1-cudnn7-runtime
|
24 |
-
COPY --from=0 /root/.local /root/.local
|
25 |
-
ENV PATH=/root/.local/bin:$PATH
|
26 |
|
27 |
EXPOSE 7860
|
28 |
|
29 |
RUN useradd -m -u 1000 user
|
30 |
USER user
|
31 |
|
32 |
-
# Set the working directory and copy the application code
|
33 |
-
WORKDIR /app
|
34 |
COPY --chown=user . $HOME/app
|
35 |
|
36 |
RUN ls -al
|
|
|
1 |
+
FROM python:latest
|
2 |
|
3 |
+
ENV PYTHONUNBUFFERED 1
|
|
|
4 |
|
5 |
+
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
+
RUN export PATH="/usr/local/cuda/bin:$PATH"
|
8 |
+
RUN wget -qO- "https://cmake.org/files/v3.17/cmake-3.17.0-Linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local
|
9 |
RUN CMAKE_ARGS="-DLLAMA_CUBLAS=on" FORCE_CMAKE=1 pip install llama-cpp-python --no-cache-dir
|
10 |
+
COPY requirements.txt ./
|
11 |
RUN pip install --upgrade pip && \
|
12 |
+
pip install -r requirements.txt
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
EXPOSE 7860
|
15 |
|
16 |
RUN useradd -m -u 1000 user
|
17 |
USER user
|
18 |
|
|
|
|
|
19 |
COPY --chown=user . $HOME/app
|
20 |
|
21 |
RUN ls -al
|