generated from amosproj/amos202Xss0Y-projname
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #111 from amosproj/88-bug-fix-local-setup-for-ever…
…y-chip-based-system-win-linux-macos-intel-macos-arm 88 bug fix local setup for every chip based system win linux macos intel macos arm
- Loading branch information
Showing
4 changed files
with
30 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,7 @@ FROM node:18-bullseye | |
WORKDIR /app | ||
|
||
COPY package*.json ./ | ||
#ENV NODE_ENV=development | ||
|
||
RUN npm i -g [email protected] | ||
RUN npm i | ||
COPY . . | ||
#RUN npm ci | ||
RUN npm ci | ||
COPY . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,26 @@ | ||
# Use Alpine 3.17, which supports Python 3.11 | ||
FROM node:18-alpine3.17 | ||
|
||
# Install Python 3.11 and other dependencies | ||
RUN apk add --no-cache python3 py3-pip python3-dev gcc musl-dev libffi-dev openssl-dev bash | ||
FROM python:3.11-slim-buster | ||
|
||
# Create the virtual environment | ||
RUN python3 -m venv /app/.venv | ||
WORKDIR /app | ||
|
||
# Set the virtual environment path | ||
ENV PATH="/app/.venv/bin:$PATH" | ||
COPY pyproject.toml poetry.lock ./ | ||
|
||
# Install Poetry | ||
RUN pip install --no-cache --upgrade pip setuptools && \ | ||
pip install poetry | ||
#Install Python and Pipx | ||
RUN python3 -m pip install --no-cache-dir --upgrade pip && \ | ||
pip install --no-cache-dir pipx && \ | ||
pipx ensurepath | ||
|
||
# Copy the dependency files | ||
WORKDIR /app | ||
COPY pyproject.toml poetry.lock ./ | ||
# Install Poetry with pipx | ||
RUN pipx install poetry | ||
|
||
# Add Poetry to PATH | ||
ENV PATH="/root/.local/bin:$PATH" | ||
|
||
# Install dependencies with Poetry | ||
RUN poetry config virtualenvs.create false && \ | ||
poetry install --no-interaction --no-ansi | ||
#Install dependencies outside of the venv | ||
RUN poetry config virtualenvs.create false | ||
RUN poetry install --no-interaction --no-ansi --verbose | ||
|
||
#Copy the remaining code | ||
COPY . . | ||
|
||
# Standard command to start the application | ||
#CMD ["/app/.venv/bin/python3", "main.py" , "--host", "0.0.0.0"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters