From 27ae76a62a38a14ff00b79a93b2b57df36d8472c Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Sun, 2 Nov 2025 21:28:11 +0000 Subject: [PATCH] update Dockerfile --- Dockerfile | 20 +++++++++++++++++--- Makefile | 2 +- packages.txt | 26 -------------------------- 3 files changed, 18 insertions(+), 30 deletions(-) delete mode 100644 packages.txt diff --git a/Dockerfile b/Dockerfile index 22adafb..593944c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,23 @@ FROM ubuntu:24.04 -ADD packages.txt packages.txt -RUN apt-get update -y && DEBIAN_FRONTEND=noninteractive apt-get install -y $(cat packages.txt) +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + curl \ + nginx \ + python3 \ + python3-pip \ + python3-dev \ + build-essential \ + libpq-dev \ + libjpeg-dev \ + zlib1g-dev \ + libopenjp2-7-dev \ + vim \ + wget \ + zip \ + && rm -rf /var/lib/apt/lists/* ADD requirements.txt requirements.txt RUN curl -LsSf https://astral.sh/uv/install.sh | sh && \ - /root/.cargo/bin/uv pip install --system --no-cache -r requirements.txt + rm -f /usr/lib/python*/EXTERNALLY-MANAGED && \ + /root/.local/bin/uv pip install --system --no-cache -r requirements.txt ADD api /emblem/api ADD web /emblem/web RUN cd /emblem/api && ./manage.py collectstatic --noinput diff --git a/Makefile b/Makefile index 5653be1..63c152c 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ ALG_FILES = \ ) \ ) -docker-build: build/Dockerfile build/packages.txt build/requirements.txt \ +docker-build: build/Dockerfile build/requirements.txt \ build/nginx.conf $(WEB_FILES) $(API_FILES) $(ALG_FILES) $(SCRIPTS_FILES) $(DATASET_FILES) find build docker build --network=host -t $(IMAGE) build diff --git a/packages.txt b/packages.txt deleted file mode 100644 index cf491a9..0000000 --- a/packages.txt +++ /dev/null @@ -1,26 +0,0 @@ -curl -gunicorn -libc6 -libcap2 -libdbus-1-3 -libexpat1 -libgcc-s1 -libgpg-error0 -libgtk-3-0 -libjsoncpp25 -liblzma5 -libopenjp2-7 -libpcre3 -libselinux1 -nginx -python3-bottle -python3-flask -python3-pillow -python3-pip -python3-psycopg2 -python3-requests -python3-opencv -vim -wget -zip -zlib1g