Update Dockerfile
Browse files- Dockerfile +15 -1
Dockerfile
CHANGED
|
@@ -9,11 +9,24 @@ RUN apt-get update && apt-get install -y \
|
|
| 9 |
curl \
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
-
# Copy
|
| 13 |
COPY requirements.txt .
|
|
|
|
|
|
|
| 14 |
RUN pip install --no-cache-dir --upgrade pip
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
# Create cache directories
|
| 18 |
RUN mkdir -p /tmp/huggingface_cache /tmp/transformers_cache /app/nltk_data
|
| 19 |
RUN chmod 777 /tmp/huggingface_cache /tmp/transformers_cache
|
|
@@ -33,3 +46,4 @@ ENV TRANSFORMERS_CACHE=/tmp/transformers_cache
|
|
| 33 |
EXPOSE 7860
|
| 34 |
|
| 35 |
CMD ["python", "main.py"]
|
|
|
|
|
|
| 9 |
curl \
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
+
# Copy requirements
|
| 13 |
COPY requirements.txt .
|
| 14 |
+
|
| 15 |
+
# Install dependencies with explicit plugin prevention
|
| 16 |
RUN pip install --no-cache-dir --upgrade pip
|
| 17 |
+
|
| 18 |
+
# ⚠️ CRITICAL: Install pinecone first WITHOUT deprecated plugins
|
| 19 |
+
RUN pip install --no-cache-dir "pinecone>=3.0.0"
|
| 20 |
+
|
| 21 |
+
# Explicitly prevent deprecated plugins from being installed
|
| 22 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 23 |
|
| 24 |
+
# Force removal of any deprecated plugins that may have snuck in
|
| 25 |
+
RUN pip uninstall pinecone-plugin-inference pinecone-plugin-records pinecone-plugin-assistant -y || true
|
| 26 |
+
|
| 27 |
+
# Verify the main pinecone package is still installed
|
| 28 |
+
RUN pip show pinecone
|
| 29 |
+
|
| 30 |
# Create cache directories
|
| 31 |
RUN mkdir -p /tmp/huggingface_cache /tmp/transformers_cache /app/nltk_data
|
| 32 |
RUN chmod 777 /tmp/huggingface_cache /tmp/transformers_cache
|
|
|
|
| 46 |
EXPOSE 7860
|
| 47 |
|
| 48 |
CMD ["python", "main.py"]
|
| 49 |
+
|