File size: 747 Bytes
953318f
 
b91f277
953318f
 
 
 
 
b91f277
953318f
c0fe430
b91f277
 
 
 
 
 
 
 
 
953318f
 
 
 
b91f277
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash

cd /root

# Check for pyproject.toml
[ ! -f pyproject.toml ] && { echo "ERROR: pyproject.toml not found."; exit 1; }

if [ -f poetry.lock ]; then
    echo "poetry.lock found. "
    echo "Checking poetry.lock consistency..."
    poetry config virtualenvs.create false
    poetry check --lock || echo "WARNING: poetry.lock is out of date. Run 'poetry lock' to update."
    echo "Proceeding with installation..."
    poetry install --no-root
    if [ $? -eq 0 ]; then
        echo "Dependencies installed successfully from poetry.lock"
    else
        echo "ERROR: Failed to install dependencies from poetry.lock"
        exit 1
    fi
else
    echo "WARNING: poetry.lock not found. Run 'poetry lock' to create it."
fi

exec /bin/bash