Update Dockerfile
Browse files- Dockerfile +4 -4
Dockerfile
CHANGED
@@ -25,7 +25,7 @@ RUN pip cache purge
|
|
25 |
RUN pip install --no-cache-dir "pinecone>=3.0.0"
|
26 |
|
27 |
# STEP 4: Verify pinecone is installed correctly
|
28 |
-
RUN python -c "import pinecone; print('
|
29 |
|
30 |
# STEP 5: Install remaining requirements
|
31 |
RUN pip install --no-cache-dir -r requirements.txt
|
@@ -34,15 +34,15 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
34 |
RUN pip uninstall pinecone-plugin-inference pinecone-plugin-records pinecone-plugin-assistant -y || true
|
35 |
|
36 |
# STEP 7: Final verification
|
37 |
-
RUN python -c "import pinecone; print('
|
38 |
-
(echo "
|
39 |
|
40 |
# Create cache directories with proper permissions for HF Spaces
|
41 |
RUN mkdir -p /tmp/huggingface_cache /tmp/transformers_cache /tmp/sentence_transformers_cache /app/nltk_data
|
42 |
RUN chmod 777 /tmp/huggingface_cache /tmp/transformers_cache /tmp/sentence_transformers_cache
|
43 |
|
44 |
# Download NLTK data
|
45 |
-
RUN python -c "import nltk; nltk.download('punkt', download_dir='/app/nltk_data')"
|
46 |
|
47 |
# Copy application code
|
48 |
COPY . .
|
|
|
25 |
RUN pip install --no-cache-dir "pinecone>=3.0.0"
|
26 |
|
27 |
# STEP 4: Verify pinecone is installed correctly
|
28 |
+
RUN python -c "import pinecone; print(' Pinecone imported successfully')"
|
29 |
|
30 |
# STEP 5: Install remaining requirements
|
31 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
34 |
RUN pip uninstall pinecone-plugin-inference pinecone-plugin-records pinecone-plugin-assistant -y || true
|
35 |
|
36 |
# STEP 7: Final verification
|
37 |
+
RUN python -c "import pinecone; print(' Final pinecone check passed')" || \
|
38 |
+
(echo " Pinecone import failed - listing installed packages:" && pip list | grep pinecone)
|
39 |
|
40 |
# Create cache directories with proper permissions for HF Spaces
|
41 |
RUN mkdir -p /tmp/huggingface_cache /tmp/transformers_cache /tmp/sentence_transformers_cache /app/nltk_data
|
42 |
RUN chmod 777 /tmp/huggingface_cache /tmp/transformers_cache /tmp/sentence_transformers_cache
|
43 |
|
44 |
# Download NLTK data
|
45 |
+
RUN python -c "import nltk; nltk.download('punkt', download_dir='/app/nltk_data')" || true
|
46 |
|
47 |
# Copy application code
|
48 |
COPY . .
|