Retour à pip install au lieu de Poetry
This commit is contained in:
parent
2a7b056698
commit
a5403db464
11 changed files with 158 additions and 3958 deletions
|
@ -1,19 +1,6 @@
|
|||
# Utiliser l'image Python 3.13 slim officielle comme base
|
||||
FROM python:3.13-slim
|
||||
|
||||
# Définir des variables d'environnement
|
||||
ENV PYTHONUNBUFFERED=1 \
|
||||
PYTHONDONTWRITEBYTECODE=1 \
|
||||
POETRY_VERSION=1.5.1 \
|
||||
POETRY_HOME="/opt/poetry" \
|
||||
POETRY_VIRTUALENVS_IN_PROJECT=true \
|
||||
POETRY_NO_INTERACTION=1 \
|
||||
PYSETUP_PATH="/opt/pysetup" \
|
||||
VENV_PATH="/opt/pysetup/.venv"
|
||||
|
||||
# Définir le répertoire de travail dans le conteneur
|
||||
WORKDIR /app
|
||||
|
||||
# Installer les dépendances système nécessaires
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
|
@ -21,25 +8,23 @@ RUN apt-get update \
|
|||
build-essential \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Installer Poetry
|
||||
RUN curl -sSL https://install.python-poetry.org | python3 -
|
||||
ENV PATH="${POETRY_HOME}/bin:${PATH}"
|
||||
# Set the working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copier les fichiers de configuration de Poetry
|
||||
COPY pyproject.toml poetry.lock* ./
|
||||
COPY requirements.txt .
|
||||
|
||||
# Installer les dépendances du projet
|
||||
RUN poetry config virtualenvs.create false \
|
||||
&& poetry install --no-dev --no-interaction --no-ansi
|
||||
# Installer les dépendances
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
# Copier le code de l'application
|
||||
COPY . .
|
||||
COPY *.py .
|
||||
|
||||
# Exposer le port sur lequel Streamlit s'exécutera
|
||||
EXPOSE 8051
|
||||
|
||||
# Définir l'entrypoint pour exécuter l'application
|
||||
ENTRYPOINT ["poetry", "run", "streamlit", "run"]
|
||||
ENTRYPOINT ["streamlit", "run"]
|
||||
|
||||
# Définir la commande par défaut avec les options optimisées pour Streamlit
|
||||
CMD ["main.py", \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue