Skip to content

Commit a5df9bf

Browse files
authored
Optimize Dockerfile by cleaning up dependencies
Removed redundant sudo installation and added PIP_BREAK_SYSTEM_PACKAGES environment variable.
1 parent 668556b commit a5df9bf

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

docker/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ RUN apt-get update && apt-get install -y \
4545
doxygen \
4646
python3 \
4747
python3-pip \
48-
sudo \
49-
&& rm -rf /var/lib/apt/lists/*
48+
sudo
49+
50+
# Allow pip to install packages system-wide (safe in Docker container)
51+
ENV PIP_BREAK_SYSTEM_PACKAGES=1
5052

5153
# Set up working directory
5254
WORKDIR /app
@@ -56,7 +58,7 @@ COPY . .
5658

5759
# Run the build script using getdeps.py (already running as root)
5860
# First install system dependencies to reduce compilation
59-
RUN apt-get update && ./build/fbcode_builder/getdeps.py install-system-deps --recursive moxygen
61+
RUN ./build/fbcode_builder/getdeps.py install-system-deps --recursive moxygen
6062

6163
# Limit parallelism to 2 jobs to avoid OOM on GitHub Actions runners (7GB RAM)
6264
RUN ./build/fbcode_builder/getdeps.py build --allow-system-packages --num-jobs 2 --verbose moxygen 2>&1 || \

0 commit comments

Comments
 (0)