Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +13 -8
Dockerfile
CHANGED
|
@@ -17,15 +17,20 @@ RUN apt-get install -y g++-11
|
|
| 17 |
|
| 18 |
ENV TRANSFORMERS_CACHE=/root/.cache
|
| 19 |
|
| 20 |
-
# only copy what's needed at every step to optimize layer cache
|
| 21 |
-
COPY ./requirements.txt .
|
| 22 |
-
# use BuildKit cache mount to drastically reduce redownloading from pip on repeated builds
|
| 23 |
-
RUN --mount=type=cache,target=/root/.cache CMAKE_ARGS="-DLLAMA_CUBLAS=on" FORCE_CMAKE=1 pip install --timeout 100 -r requirements.txt llama-cpp-python==0.1.83
|
| 24 |
-
COPY SOURCE_DOCUMENTS ./SOURCE_DOCUMENTS
|
| 25 |
-
COPY ingest.py constants.py ./
|
| 26 |
-
|
| 27 |
COPY . .
|
| 28 |
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
CMD ./run.sh
|
|
|
|
| 17 |
|
| 18 |
ENV TRANSFORMERS_CACHE=/root/.cache
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
COPY . .
|
| 21 |
|
| 22 |
+
# setting build related env vars
|
| 23 |
+
ENV CUDA_DOCKER_ARCH=all
|
| 24 |
+
ENV LLAMA_CUBLAS=1
|
| 25 |
+
|
| 26 |
+
# Install depencencies
|
| 27 |
+
RUN python3 -m pip install --upgrade pip pytest cmake \
|
| 28 |
+
scikit-build setuptools fastapi uvicorn sse-starlette \
|
| 29 |
+
pydantic-settings starlette-context gradio huggingface_hub hf_transfer
|
| 30 |
+
|
| 31 |
+
RUN CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python
|
| 32 |
+
RUN CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install --timeout 100 -r requirements.txt
|
| 33 |
+
|
| 34 |
+
RUN chmod +x ./run.sh
|
| 35 |
|
| 36 |
CMD ./run.sh
|