init push
Browse files- app.py +0 -1
- setup_envs.sh +39 -0
app.py
CHANGED
|
@@ -433,7 +433,6 @@ with gr.Blocks(
|
|
| 433 |
label="Preview",
|
| 434 |
columns=4,
|
| 435 |
height="300px",
|
| 436 |
-
show_download_button=True,
|
| 437 |
object_fit="contain",
|
| 438 |
preview=True,
|
| 439 |
)
|
|
|
|
| 433 |
label="Preview",
|
| 434 |
columns=4,
|
| 435 |
height="300px",
|
|
|
|
| 436 |
object_fit="contain",
|
| 437 |
preview=True,
|
| 438 |
)
|
setup_envs.sh
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# Script to verify PyTorch dependencies in Docker container
|
| 4 |
+
# This script checks existing PyTorch/numpy versions and modifies requirements.txt
|
| 5 |
+
# to avoid reinstalling them, using the base image versions instead.
|
| 6 |
+
|
| 7 |
+
set -e
|
| 8 |
+
|
| 9 |
+
echo "=== Starting dependency verification script ==="
|
| 10 |
+
|
| 11 |
+
# Check existing PyTorch and numpy
|
| 12 |
+
echo "=== Checking existing PyTorch and numpy ==="
|
| 13 |
+
python3 -c "import torch; import torchvision; import numpy; print(f'Existing torch: {torch.__version__}, torchvision: {torchvision.__version__}, numpy: {numpy.__version__}')" || echo "check failed"
|
| 14 |
+
|
| 15 |
+
# Verify requirements.txt exists
|
| 16 |
+
if [ ! -f "requirements.txt" ]; then
|
| 17 |
+
echo "ERROR: requirements.txt not found in current directory"
|
| 18 |
+
exit 1
|
| 19 |
+
fi
|
| 20 |
+
|
| 21 |
+
echo "=== Original requirements.txt ==="
|
| 22 |
+
cat requirements.txt
|
| 23 |
+
|
| 24 |
+
# Modify requirements to remove torch, torchvision, and numpy (to use system versions)
|
| 25 |
+
echo "=== Modifying requirements.txt to remove torch, torchvision, and numpy ==="
|
| 26 |
+
sed -i '/^torch==/d' requirements.txt
|
| 27 |
+
sed -i '/^torch>=/d' requirements.txt
|
| 28 |
+
sed -i '/^torch$/d' requirements.txt
|
| 29 |
+
sed -i '/^torchvision/d' requirements.txt
|
| 30 |
+
sed -i '/^numpy/d' requirements.txt
|
| 31 |
+
|
| 32 |
+
echo "=== Modified requirements.txt ==="
|
| 33 |
+
cat requirements.txt
|
| 34 |
+
|
| 35 |
+
# Install modified requirements
|
| 36 |
+
echo "=== Installing modified requirements ==="
|
| 37 |
+
pip install --no-cache-dir --ignore-installed blinker -r requirements.txt
|
| 38 |
+
|
| 39 |
+
echo "=== Dependency verification completed successfully ==="
|