Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
10 changes: 9 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand Down
Loading