Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +17 -7
Dockerfile
CHANGED
|
@@ -11,16 +11,26 @@ RUN apt-get update && apt-get install -y \
|
|
| 11 |
python3-pybind11 \
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
-
#
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 17 |
|
| 18 |
-
#
|
| 19 |
-
|
| 20 |
-
RUN pip install -e .
|
| 21 |
|
| 22 |
-
#
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
# Run the application
|
| 26 |
CMD ["streamlit", "run", "app.py"]
|
|
|
|
| 11 |
python3-pybind11 \
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
+
# Debug: List installed packages
|
| 15 |
+
RUN python -m pip list
|
| 16 |
+
|
| 17 |
+
# Copy all files at once to maintain relationships
|
| 18 |
+
COPY . .
|
| 19 |
+
|
| 20 |
+
# Install Python dependencies
|
| 21 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 22 |
|
| 23 |
+
# Build the C++ extension with verbose output
|
| 24 |
+
RUN python -m pip install -e . --verbose
|
|
|
|
| 25 |
|
| 26 |
+
# Verify the extension exists after building
|
| 27 |
+
RUN python -c "import os; print('Contents of directory:'); print(os.listdir('.')); \
|
| 28 |
+
print('Looking for .so files:'); print([f for f in os.listdir('.') if f.endswith('.so')]); \
|
| 29 |
+
print('Python path:'); import sys; print(sys.path)"
|
| 30 |
+
|
| 31 |
+
# Check if the module can be imported
|
| 32 |
+
RUN python -c "try: import cubic_cpp; print('✓ Successfully imported cubic_cpp'); \
|
| 33 |
+
except ImportError as e: print(f'✗ Import failed: {e}')"
|
| 34 |
|
| 35 |
# Run the application
|
| 36 |
CMD ["streamlit", "run", "app.py"]
|