Skip to content

Commit 2c0af50

Browse files
committed
dockerfile rootless docker perm improvement, test trigger docs build with PRs
1 parent b10649d commit 2c0af50

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

dockers/base-cuda/Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ RUN \
9696
# uv pip install -r requirements/devel.txt && \
9797
# Update six
9898
uv pip install -U six && \
99-
chmod -R 777 /tmp/venvs/fts_dev && \
10099
rm -rf requirements.* requirements/
101100

102101
RUN \
@@ -113,8 +112,8 @@ RUN \
113112
RUN \
114113
echo "=== Post-ENV permission check ===" && \
115114
ls -ld /tmp/venvs/fts_dev && \
116-
echo "Checking torch __pycache__ permissions:" && \
117-
find /tmp/venvs/fts_dev -type d -path "*/torch/__pycache__" | head -3 | xargs ls -ld || echo "No torch __pycache__ found" && \
115+
echo "Checking __pycache__ permissions (sample):" && \
116+
find /tmp/venvs/fts_dev -type d -name "__pycache__" | head -5 | xargs ls -ld || echo "No __pycache__ found" && \
118117
echo "=== Post-ENV check complete ==="
119118

120119
RUN \
@@ -129,4 +128,9 @@ RUN \
129128
python -c "import sys; ver = sys.version_info; print(f'Python {ver.major}.{ver.minor} detected'); assert f'{ver.major}.{ver.minor}' == '$PYTHON_VERSION', ver" && \
130129
echo "Verifying PyTorch version:" && \
131130
python -c "import torch; print(f'PyTorch {torch.__version__} detected'); assert torch.__version__.startswith('$PYTORCH_VERSION'), torch.__version__" && \
132-
echo "============= Environment Verification Complete ============="
131+
echo "============= Environment Verification Complete =============" && \
132+
# Apply recursive chmod to allow userns-remapped rootless Docker users to update the venv
133+
chmod -R 777 /tmp/venvs/fts_dev && \
134+
echo "Verify permission state after final chmod:" && \
135+
find /tmp/venvs/fts_dev -type d -name "__pycache__" | head -5 | xargs ls -ld || echo "No __pycache__ found" && \
136+
echo "=== Post-env-check chmod complete ==="

0 commit comments

Comments
 (0)