Skip to content

Commit

Permalink
fix(docker): reduce docker image size (#2195)
Browse files Browse the repository at this point in the history
Not installing PyQt in docker image saves around 200 Mo.
Not keeping pip cache saves again another ~200 Mo.

Signed-off-by: Sylvain Leclerc <[email protected]>
  • Loading branch information
sylvlecl authored Oct 22, 2024
1 parent a5d4231 commit 6985672
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ jobs:
- name: 🐍 Install development dependencies
run: |
python -m pip install --upgrade pip
pip install pydantic --no-binary pydantic
pip install -r requirements-dev.txt
- name: 🐍 Install Windows dependencies
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ COPY ./alembic.ini /alembic.ini

RUN ./scripts/install-debug.sh

RUN pip3 install --upgrade pip \
&& pip3 install -r /conf/requirements.txt
RUN pip3 install --no-cache-dir --upgrade pip \
&& pip3 install --no-cache-dir -r /conf/requirements.txt


ENTRYPOINT ["./scripts/start.sh"]
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Install back-end dependencies

```shell script
python -m pip install --upgrade pip
pip install pydantic --no-binary pydantic
pip install -r requirements.txt # use requirements-dev.txt if building a single binary with pyinstaller
```

Expand Down
4 changes: 4 additions & 0 deletions requirements-desktop.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-r requirements.txt

# PyQt is used for the systray app of desktop version
PyQt5~=5.15.6
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
-r requirements-test.txt
-r requirements-desktop.txt
# Version of Black should match the versions set in `.github/workflows/main.yml`
black~=23.7.0
isort~=5.12.0
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ paramiko~=3.4.1
plyer~=2.0.0
psycopg2-binary==2.9.4
py7zr~=0.20.6
PyQt5~=5.15.6
python-json-logger~=2.0.7
PyYAML~=5.4.1; python_version <= '3.9'
PyYAML~=5.3.1; python_version > '3.9'
Expand Down

0 comments on commit 6985672

Please sign in to comment.