Преглед изворни кода

Installation de Poetry au lieu de Docker

le dockerfile reste au cas où son utilisation évolue
feature/use_fb_data
Figg пре 4 месеци
родитељ
комит
ad2ed689a1
3 измењених фајлова са 27 додато и 16 уклоњено
  1. 8
    13
      docker/Dockerfile
  2. 0
    3
      docker/requirements.txt
  3. 19
    0
      pyproject.toml

+ 8
- 13
docker/Dockerfile Прегледај датотеку

@@ -1,21 +1,16 @@
1
-# Utiliser une image Python de base
2
-FROM python:3.11
1
+FROM python:3.11-slim
3 2
 
3
+RUN pip install poetry \
4
+    && poetry config virtualenvs.create false
4 5
 RUN useradd --create-home --shell /bin/bash user
5 6
 USER user
6 7
 
7
-# Créer un répertoire de travail
8
-WORKDIR /home/user/mil
9 8
 
10
-COPY docker/requirements.txt ./
9
+WORKDIR /home/user/million
10
+COPY pyproject.toml poetry.lock ./
11 11
 
12
-RUN pip install --no-cache-dir --upgrade pip \
13
-  && pip install --no-cache-dir -r requirements.txt
12
+RUN poetry install --no-dev
14 13
 
15
-# Copier le script Python et tout autre fichier nécessaire dans le conteneur
16
-COPY python/script.py .
17
-COPY data/html_content.html data/
14
+COPY million/ ./
18 15
 
19
-
20
-# Définir la commande par défaut pour exécuter le script Python
21
-CMD ["python", "script.py"]
16
+# CMD ["poetry", "run", "python", "million/scripts/script.py"]

+ 0
- 3
docker/requirements.txt Прегледај датотеку

@@ -1,3 +0,0 @@
1
-beautifulsoup4
2
-pycairo
3
-igraph

+ 19
- 0
pyproject.toml Прегледај датотеку

@@ -0,0 +1,19 @@
1
+[tool.poetry]
2
+name = "million-graph"
3
+version = "0.1.0"
4
+description = "Analyse et statistiques de données de conversation facebook Messenger"
5
+authors = ["Figg <mael.delanoe@gmail.com>"]
6
+license = "MIT"
7
+readme = "README.md"
8
+packages = [{include = "million"}]
9
+
10
+[tool.poetry.dependencies]
11
+python = "^3.11"
12
+beautifulsoup4 = "^4.12.3"
13
+pycairo = "^1.27.0"
14
+igraph = "^0.11.6"
15
+
16
+
17
+[build-system]
18
+requires = ["poetry-core"]
19
+build-backend = "poetry.core.masonry.api"

Loading…
Откажи
Сачувај