Can't upload my configuration's discord bot with cv2 & postgres(async)
officialevsty
TRIALOP

a year ago

Can't set dependencies appropriate in Dockerfile, image created, container ran, but crash causes discord modules not found. I supposed that causes because I incorrectly built dockerfile for my configuration

Solved

2 Replies

officialevsty
TRIALOP

a year ago

requirements.txt:
aiohappyeyeballs==2.4.0 aiohttp==3.10.5 aiosignal==1.3.1 asgiref==3.8.1 async-timeout==4.0.3 asyncpg==0.29.0 attrs==24.2.0 certifi==2024.8.30 charset-normalizer==3.3.2 discord==2.3.2 discord.py==2.4.0 Django==5.1.1 django-scheduler==0.10.1 easyocr==1.7.1 filelock==3.16.0 frozenlist==1.4.1 fsspec==2024.9.0 greenlet==3.0.3 icalendar==5.0.13 idna==3.8 imageio==2.35.1 Jinja2==3.1.4 lazy_loader==0.4 MarkupSafe==2.1.5 mpmath==1.3.0 multidict==6.0.5 networkx==3.3 ninja==1.11.1.1 numpy==2.1.1 opencv-contrib-python==4.10.0.84 opencv-contrib-python-headless==4.10.0.84 opencv-python-headless==4.10.0.84 packaging==24.1 pillow==10.4.0 pyclipper==1.3.0.post5 python-bidi==0.6.0 python-dateutil==2.9.0.post0 pytz==2024.1 PyYAML==6.0.2 requests==2.32.3 scikit-image==0.24.0 scipy==1.14.1 shapely==2.0.6 six==1.16.0 SQLAlchemy==2.0.34 sqlparse==0.5.1 sympy==1.13.2 tifffile==2024.8.30 torch==2.4.1 torchvision==0.19.1 typing_extensions==4.12.2 tzdata==2024.1 urllib3==2.2.2 yarl==1.9.11

Dockerfile:
FROM python:3.11-slim # Установка системных зависимостей RUN apt-get update && apt-get install -y \ libgl1-mesa-glx \ libglib2.0-0 \ libpq-dev \ build-essential \ && rm -rf /var/lib/apt/lists/* # Установка рабочей директории WORKDIR /app # Копирование файлов проекта COPY requirements.txt requirements.txt # Установка зависимостей RUN python -m venv venv \ && . venv/bin/activate \ && pip install -r requirements.txt COPY . . # Запуск приложения CMD ["python", "main.py"]

nixpacks.toml:

[phases.setup]
apt_pkgs = ["python3", "python3-pip", "libgl1-mesa-glx"]

[phases.build]
commands = ["pip install -r requirements.txt"]

a year ago

Looks like your latest deployment is active, closing out.


Status changed to Solved brody over 1 year ago


Loading...