diff --git a/Dockerfile b/Dockerfile index ae3e29e..b2e6305 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,12 +9,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ WORKDIR /app -COPY ${EXAMPLE}/requirements.txt ./requirements.txt -RUN pip install --no-cache-dir --upgrade pip && \ - pip install --no-cache-dir -r requirements.txt - COPY ${EXAMPLE}/ ./ +RUN if [ -f requirements.txt ]; then \ + pip install --no-cache-dir --upgrade pip && \ + pip install --no-cache-dir -r requirements.txt; \ + else \ + echo "No requirements.txt found — skipping dependency install."; \ + fi + RUN if [ -f .env.example ] && [ ! -f .env ]; then cp .env.example .env; fi ENTRYPOINT ["python"] diff --git a/setup.sh b/setup.sh index c0aee12..1cbd330 100755 --- a/setup.sh +++ b/setup.sh @@ -87,7 +87,15 @@ else echo "[2/4] Virtual environment already exists." fi -source .venv/bin/activate +if [[ -f ".venv/bin/activate" ]]; then + source .venv/bin/activate +elif [[ -f ".venv/Scripts/activate" ]]; then + source .venv/Scripts/activate +else + echo "Error: virtual environment activation script not found in .venv." >&2 + echo "Try deleting .venv and re-running this script." >&2 + exit 1 +fi if [[ -f "requirements.txt" ]]; then echo "[3/4] Installing dependencies..."