Spaces:
Sleeping
Sleeping
MVPilgrim
commited on
Commit
·
fb8e545
1
Parent(s):
8f1a866
debug
Browse files- Dockerfile +8 -2
- app.py +1 -2
- startup.sh +2 -0
Dockerfile
CHANGED
|
@@ -43,8 +43,14 @@ RUN python3 -m pip install --upgrade pip
|
|
| 43 |
COPY ./requirements.txt /app/requirements.txt
|
| 44 |
RUN pip3 install --break-system-packages --no-cache-dir --upgrade -r /app/requirements.txt
|
| 45 |
RUN pip3 install --break-system-packages https://files.pythonhosted.org/packages/13/87/e0cb08c2d4bd7d38ab63816b306c8b1e7cfdc0e59bd54462e8b0df069078/semantic_text_splitter-0.6.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
|
| 46 |
-
|
| 47 |
-
RUN
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
RUN pip3 install --break-system-packages cffi
|
| 49 |
|
| 50 |
# Install text2vec-transformers
|
|
|
|
| 43 |
COPY ./requirements.txt /app/requirements.txt
|
| 44 |
RUN pip3 install --break-system-packages --no-cache-dir --upgrade -r /app/requirements.txt
|
| 45 |
RUN pip3 install --break-system-packages https://files.pythonhosted.org/packages/13/87/e0cb08c2d4bd7d38ab63816b306c8b1e7cfdc0e59bd54462e8b0df069078/semantic_text_splitter-0.6.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
|
| 46 |
+
|
| 47 |
+
#RUN pip3 install --break-system-packages llama_cpp_python
|
| 48 |
+
#RUN FORCE_CMAKE=1 CMAKE_SYSTEM_PROCESSOR=AMD64 pip3 install --break-system-packages --verbose --no-cache-dir llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
|
| 49 |
+
#RUN FORCE_CMAKE=1 CMAKE_SYSTEM_PROCESSOR=AMD64 pip3 install --break-system-packages --verbose --no-cache-dir llama-cpp-python
|
| 50 |
+
|
| 51 |
+
#RUN CMAKE_ARGS="-DLLAMA_CUBLAS=on -DCUDA_PATH=/usr/local/cuda-12.2 -DCUDAToolkit_ROOT=/usr/local/cuda-12.2 -DCUDAToolkit_INCLUDE_DIR=/usr/local/cuda-12/include -DCUDAToolkit_LIBRARY_DIR=/usr/local/cuda-12.2/lib64" FORCE_CMAKE=1 pip install llama-cpp-python - no-cache-dir
|
| 52 |
+
RUN CMAKE_ARGS="-DLLAMA_CUBLAS=on FORCE_CMAKE=1 pip install --break-system-packages llama-cpp-python --no-cache-dir
|
| 53 |
+
|
| 54 |
RUN pip3 install --break-system-packages cffi
|
| 55 |
|
| 56 |
# Install text2vec-transformers
|
app.py
CHANGED
|
@@ -398,7 +398,7 @@ try:
|
|
| 398 |
###############################################################################
|
| 399 |
# Initial the the sentence transformer and encode the query prompt.
|
| 400 |
logger.debug(f"#### Encode text query prompt to create vectors. {promptText}")
|
| 401 |
-
model = SentenceTransformer('/app/
|
| 402 |
vector = model.encode(promptText)
|
| 403 |
|
| 404 |
logLevel = logger.getEffectiveLevel()
|
|
@@ -406,7 +406,6 @@ try:
|
|
| 406 |
wrks = str(vector)
|
| 407 |
logger.debug(f"### vector: {wrks}")
|
| 408 |
|
| 409 |
-
|
| 410 |
vectorList = []
|
| 411 |
for vec in vector:
|
| 412 |
vectorList.append(vec)
|
|
|
|
| 398 |
###############################################################################
|
| 399 |
# Initial the the sentence transformer and encode the query prompt.
|
| 400 |
logger.debug(f"#### Encode text query prompt to create vectors. {promptText}")
|
| 401 |
+
model = SentenceTransformer('/app/multi-qa-MiniLM-L6-cos-v1')
|
| 402 |
vector = model.encode(promptText)
|
| 403 |
|
| 404 |
logLevel = logger.getEffectiveLevel()
|
|
|
|
| 406 |
wrks = str(vector)
|
| 407 |
logger.debug(f"### vector: {wrks}")
|
| 408 |
|
|
|
|
| 409 |
vectorList = []
|
| 410 |
for vec in vector:
|
| 411 |
vectorList.append(vec)
|
startup.sh
CHANGED
|
@@ -7,6 +7,8 @@
|
|
| 7 |
#####################################
|
| 8 |
exec &> /app/startup.log
|
| 9 |
|
|
|
|
|
|
|
| 10 |
stdbuf -o0 echo "#### startup.sh entered."
|
| 11 |
#stdbuf -o0 echo "### ps -ef 1"; ps -ef
|
| 12 |
|
|
|
|
| 7 |
#####################################
|
| 8 |
exec &> /app/startup.log
|
| 9 |
|
| 10 |
+
echo "#### pip3 list"; pip3 list
|
| 11 |
+
|
| 12 |
stdbuf -o0 echo "#### startup.sh entered."
|
| 13 |
#stdbuf -o0 echo "### ps -ef 1"; ps -ef
|
| 14 |
|