Skip to content

Commit

Permalink
refactor: streamline dependency installation in Docker base image
Browse files Browse the repository at this point in the history
- Updated the dependencies in the Docker base image installation scripts by removing unnecessary packages and ensuring essential tools are included.
- Simplified the Python installation script by refining the list of required libraries, enhancing clarity and reducing potential installation issues.
- Modified the requirements.txt to include only necessary packages, improving the efficiency of the Python environment setup.
  • Loading branch information
tikazyq committed Dec 31, 2024
1 parent fec6160 commit 3786ef3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 32 deletions.
17 changes: 4 additions & 13 deletions docker/base-image/install/deps/deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,21 @@
# Fail on error
set -e

# Ensure directory mode of /tmp is world-writable (readable, writable, executable by all users)
# This is important for temporary file operations in containerized environments
# Ensure directory mode of /tmp is world-writable
chmod 777 /tmp

# Update the package index files from the repositories
# This ensures we get the latest versions of packages
# Update package index
apt-get update

# Install common dependencies with detailed explanations
# -y flag means "yes" to all prompts (non-interactive installation)
# Install essential dependencies
apt-get install -y \
curl \
wget \
git \
net-tools \
iputils-ping \
ntp \
ntpdate \
nginx \
unzip \
zip \
jq \
gnupg2 \
libc6
net-tools

# Add source /etc/profile to ~/.bashrc
echo "source /etc/profile" >> ~/.bashrc
14 changes: 2 additions & 12 deletions docker/base-image/install/python/python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,9 @@ install_dependencies() {
build-essential \
libssl-dev \
zlib1g-dev \
libbz2-dev \
libreadline-dev \
libsqlite3-dev \
wget \
curl \
llvm \
libncursesw5-dev \
xz-utils \
tk-dev \
libxml2-dev \
libxmlsec1-dev \
libffi-dev \
liblzma-dev
libxslt-dev \
libffi-dev
}

# Function to setup pyenv
Expand Down
10 changes: 3 additions & 7 deletions docker/base-image/install/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
scrapy>=2.9.0
pymongo
bs4
crawlab-sdk>=0.7.0rc1
crawlab-demo<=0.1.0
scrapy
selenium
pyopenssl
playwright
feapder
bs4
requests

0 comments on commit 3786ef3

Please sign in to comment.