From 491508a400e0f3c6109d7989ecd600002b8b3436 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Fri, 4 Feb 2022 08:38:03 +0000 Subject: [PATCH] switch docker image to python:slim, move requirements.txt to .devcontainer/ Former-commit-id: 427a37e514f689b9246ce4395bf179e079a5a903 --- .devcontainer/Dockerfile | 11 +++++------ .devcontainer/dev-dockerfile | 2 -- .devcontainer/devcontainer.json | 18 +++++------------ {src => .devcontainer}/requirements.txt | 26 +++++++++++-------------- 4 files changed, 21 insertions(+), 36 deletions(-) delete mode 100644 .devcontainer/dev-dockerfile rename {src => .devcontainer}/requirements.txt (70%) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 160a9b9..f762d03 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,7 +1,6 @@ -FROM ubuntu:20.04 +FROM python:slim WORKDIR / -RUN apt-get -y update -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata -RUN apt-get install -y python3 python3-dev git python3-pip python3-kivy python-is-python3 libgl1-mesa-dev build-essential -RUN ln -s $(which pip3) /usr/bin/pip -RUN pip install pymongo pandas numpy scipy scikit-learn matplotlib pylint kivy \ No newline at end of file +RUN apt-get -y update; apt-get -y upgrade +RUN apt-get -y install git +COPY requirements.txt . +RUN pip install -r requirements.txt \ No newline at end of file diff --git a/.devcontainer/dev-dockerfile b/.devcontainer/dev-dockerfile deleted file mode 100644 index 74659d4..0000000 --- a/.devcontainer/dev-dockerfile +++ /dev/null @@ -1,2 +0,0 @@ -FROM titanscout2022/tra-analysis-base:latest -WORKDIR / \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 81b21b5..f62f520 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,23 +1,15 @@ { "name": "TRA Analysis Development Environment", "build": { - "dockerfile": "dev-dockerfile", + "dockerfile": "Dockerfile", }, "settings": { "terminal.integrated.shell.linux": "/bin/bash", - "python.pythonPath": "/usr/local/bin/python", + "python.pythonPath": "", "python.linting.enabled": true, "python.linting.pylintEnabled": true, - "python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8", - "python.formatting.blackPath": "/usr/local/py-utils/bin/black", - "python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf", - "python.linting.banditPath": "/usr/local/py-utils/bin/bandit", - "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", - "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", - "python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle", - "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", - "python.linting.pylintPath": "/usr/local/bin/pylint", - "python.testing.pytestPath": "/usr/local/py-utils/bin/pytest", + "python.linting.pylintPath": "", + "python.testing.pytestPath": "", "editor.tabSize": 4, "editor.insertSpaces": false }, @@ -26,5 +18,5 @@ "ms-python.python", "waderyan.gitblame" ], - "postCreateCommand": "/usr/bin/pip3 install -r ${containerWorkspaceFolder}/src/requirements.txt && /usr/bin/pip3 install --no-cache-dir pylint && /usr/bin/pip3 install pytest" + "postCreateCommand": "" } \ No newline at end of file diff --git a/src/requirements.txt b/.devcontainer/requirements.txt similarity index 70% rename from src/requirements.txt rename to .devcontainer/requirements.txt index c295882..56ec5dc 100644 --- a/src/requirements.txt +++ b/.devcontainer/requirements.txt @@ -1,19 +1,15 @@ -requests -pymongo -tra-analysis - +cerberus dnspython -pyinstaller - numpy -scipy -scikit-learn -six +pyinstaller +pylint +pymongo pyparsing - -kivy==2.0.0rc2 - -pyzmq +pytest python-daemon - -cerberus \ No newline at end of file +pyzmq +requests +scikit-learn +scipy +six +tra-analysis \ No newline at end of file