MoneyPrinterV2 icon indicating copy to clipboard operation
MoneyPrinterV2 copied to clipboard

Adds docker integration

Open fahrulalwan opened this issue 11 months ago • 5 comments

This PR adds Docker integration to make it easier to deploy. It addresses issue #87

fahrulalwan avatar Jan 11 '25 18:01 fahrulalwan

This won't run on ARM devices tho. The problem is with building spacy and its dependencies.

UltraInstinct0x avatar Jan 15 '25 21:01 UltraInstinct0x

Here is what worked for me, however there seems to be no firefox profile for this docker or idk, i've been dealing with this stuff for more than 3 hours and I am really bored, I won't be using this anyways so someone else can take it up from here.

Dockerfile

FROM python:3.9

WORKDIR /app

# Install system dependencies and Rust
RUN apt-get update && apt-get install -y \
    build-essential \
    cmake \
    pkg-config \
    gfortran \
    libopenblas-dev \
    liblapack-dev \
    python3-dev \
    curl \
    && rm -rf /var/lib/apt/lists/*

# Install Rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

# Upgrade pip and install build tools
RUN pip install --no-cache-dir --upgrade pip setuptools wheel

# Install numpy first as it's a common dependency
RUN pip install --no-cache-dir numpy==1.22.0

# Copy and install requirements
COPY requirements.txt .

# Install requirements
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of the application
COPY . .

CMD ["python", "main.py"]

And docker-compose.yml

`version: '3.8'

services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "8000:8000"
    volumes:
      - .:/app
    environment:
      - PYTHONUNBUFFERED=1
      - CONFIG_FILE=config.json
    stdin_open: true
    tty: true
    command: ["python", "src/main.py"]`

of course this had potential but if you are gonna make everything this nonsense at least make it work on docker... or dont just put it upp here anyways. sorry for on the edge comment but im so pissed this was just a waste of time tbh. I could ve used some other repo that comes with docker and not my own damn firefox profiles or shit. thanks anyway.

UltraInstinct0x avatar Jan 15 '25 22:01 UltraInstinct0x

@UltraInstinct0x Make your own then. I am not planning on adding any significant features. Calling this nonsense is no-brain behaviour. Also no thanks, I will continue sharing my code, even if you disagree.

FujiwaraChoki avatar Jan 17 '25 10:01 FujiwaraChoki

@FujiwaraChoki yeah, you are totally right, im forking. thanks anyways.

UltraInstinct0x avatar Jan 17 '25 14:01 UltraInstinct0x

This PR adds Docker integration to make it easier to deploy. It addresses issue #87

Is this on dockerhub so I could get it running on my unraid machine? I tried building from scratch but I believe I may have done something wrong because it kept failing.

osnapitsjoey avatar Jan 24 '25 21:01 osnapitsjoey