Skip to content

Commit 6d51f7a

Browse files
committed
Fix nitpicked issues
1 parent dd97e75 commit 6d51f7a

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# This file should remain in sync with .gitignore. If you need to make changes,
22
# please add a comment explaining why. For items that must be removed, comment
33
# them out instead of deleting them.
4+
45
__pycache__/
56
*.py[cod]
67
/output/
@@ -16,7 +17,7 @@ extra_model_paths.yaml
1617
/.vs
1718
.vscode/
1819
.idea/
19-
venv/
20+
venv*/
2021
.venv/
2122
/web/extensions/*
2223
!/web/extensions/logging.js.example

Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
# supported at a time.
1212
FROM python:3.12.12-trixie
1313

14-
# Install cmake, which is an indirect installation dependencies
14+
# Install cmake, which is an indirect installation dependencies. We also keep
15+
# the apt cache following the update so the image can be quickly rebuilt with
16+
# additional, user-defined system dependencies required by custom node packs.
1517
RUN apt-get update && apt-get install -y --no-install-recommends cmake
1618

1719
# Create a regular user whose UID and GID will match the host user's at runtime.
@@ -53,7 +55,7 @@ ENV PIP_EXTRA_INDEX_URL=${PIP_EXTRA_INDEX_URL}
5355
#
5456
# Since this step takes a long time to complete, it's performed early to take
5557
# advantage of Docker's build cache, thereby accelerating subsequent builds.
56-
COPY requirements.txt manager_requirements.txt ./
58+
COPY requirements.txt ./
5759
RUN pip install \
5860
--no-cache-dir \
5961
--disable-pip-version-check \
@@ -88,7 +90,8 @@ RUN chmod +x entrypoint.sh
8890
ENTRYPOINT [ "./entrypoint.sh" ]
8991
CMD [ "python", "./main.py" ]
9092

91-
# Install additional system dependencies
93+
# Install additional system dependencies. Users can use this to install
94+
# dependencies required by custom node packs.
9295
ARG APT_EXTRA_PACKAGES
9396
RUN apt-get install -y --no-install-recommends $APT_EXTRA_PACKAGES \
9497
&& apt-get clean \

entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ chown -R "$user:$user_group" \
3939
# address this issue.
4040
echo "[entrypoint] Adding user to GPU device groups..."
4141
for dev in /dev/nvidia*; do
42+
[ -e "$dev" ] || continue
4243
group=$(ls -ld "$dev" | awk '{print $4}')
4344
usermod -aG "$group" "$user"
4445
done

0 commit comments

Comments
 (0)