inventree / InvenTree

Open Source Inventory Management System
https://docs.inventree.org
MIT License
4.23k stars 759 forks source link

Docker invoke update error #8349

Open zeskeertwee opened 3 hours ago

zeskeertwee commented 3 hours ago

Deployment Method

Describe the problem*

When i run the first step in the docker installation manual, i get an error. I have tried completely clearing the INVENTREE_EXT_VOLUME folder and clearing the docker images/containers, but to no avail.

$ docker compose run --rm inventree-server invoke update
[+] Creating 1/0
 ✔ Container inventree-db  Running                                                                               0.0s 
Creating directory /home/inventree/data/static
Creating directory /home/inventree/data/media
Creating directory /home/inventree/data/backup
Copying config file from /home/inventree/src/backend/InvenTree/config_template.yml to /home/inventree/data/config.yaml
Installing required python packages from 'src/backend/requirements.txt'
Requirement already satisfied: pip in /usr/local/lib/python3.11/site-packages (24.0)
Collecting pip
  Downloading pip-24.2-py3-none-any.whl.metadata (3.6 kB)
Requirement already satisfied: setuptools in /root/.local/lib/python3.11/site-packages (72.1.0)
Collecting setuptools
  Downloading setuptools-75.2.0-py3-none-any.whl.metadata (6.9 kB)
Downloading pip-24.2-py3-none-any.whl (1.8 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 4.7 MB/s eta 0:00:00
Downloading setuptools-75.2.0-py3-none-any.whl (1.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 5.8 MB/s eta 0:00:00
Installing collected packages: setuptools, pip
  Attempting uninstall: setuptools
    Found existing installation: setuptools 72.1.0
    Uninstalling setuptools-72.1.0:
      Successfully uninstalled setuptools-72.1.0
  Attempting uninstall: pip
    Found existing installation: pip 24.0
    Uninstalling pip-24.0:
ERROR: Could not install packages due to an OSError: [Errno 39] Directory not empty: 'platformdirs'

Here is my .env file:

# InvenTree environment variables for docker compose deployment

# Specify the location of the external data volume
# By default, placed in local directory 'inventree-data'
INVENTREE_EXT_VOLUME=./inventree-data

# Ensure debug is false for a production setup
INVENTREE_DEBUG=False
INVENTREE_LOG_LEVEL=WARNING

# InvenTree admin account details
# Un-comment (and complete) these lines to auto-create an admin acount
INVENTREE_ADMIN_USER=admin
INVENTREE_ADMIN_PASSWORD=1Aujvw2YyxJHN1tGIQ2uQpzhtwh5GjX1yXOnS8V
INVENTREE_ADMIN_EMAIL=someone@somewhere.com

# Database configuration options
INVENTREE_DB_ENGINE=postgresql
INVENTREE_DB_NAME=inventree
INVENTREE_DB_HOST=inventree-db
INVENTREE_DB_PORT=5432

# Database credentials - These should be changed from the default values!
INVENTREE_DB_USER=inventree-pg
INVENTREE_DB_PASSWORD=99HGvVSsm54gwuYx2CLPCjq28F9MUZvVr4qChs6

# Redis cache setup (disabled by default)
# Un-comment the following lines to enable Redis cache
# Note that you will also have to run docker-compose with the --profile redis command
# Refer to settings.py for other cache options
#INVENTREE_CACHE_ENABLED=True
#INVENTREE_CACHE_HOST=inventree-cache
#INVENTREE_CACHE_PORT=6379

# Options for gunicorn server
INVENTREE_GUNICORN_TIMEOUT=90

# Enable custom plugins?
INVENTREE_PLUGINS_ENABLED=True

# Run migrations automatically?
INVENTREE_AUTO_UPDATE=True

# Image tag that should be used
INVENTREE_TAG=stable

# Site URL - update this to match your host
INVENTREE_SITE_URL="http://192.168.0.205"

COMPOSE_PROJECT_NAME=inventree

Steps to Reproduce

  1. Download docker-compose.yml and related files from the set-up guide
  2. Set parameters in .env file
  3. Run docker compose run --rm inventree-server invoke update

Relevant log output

No response

zeskeertwee commented 2 hours ago

I re-pulled the images one more time, using the docker-compose.yml from the stable branch (same .env config), and it doesn't give this error anymore.