Skip to content

Commit

Permalink
feat: updated dependency management
Browse files Browse the repository at this point in the history
  • Loading branch information
tikazyq committed Dec 17, 2024
1 parent c945e09 commit e77d4cd
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 59 deletions.
1 change: 1 addition & 0 deletions core/models/models/dependency_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ type DependencyConfig struct {
PkgCmd string `json:"pkg_cmd" bson:"pkg_cmd"`
Proxy string `json:"proxy" bson:"proxy"`
Setup bool `json:"setup" bson:"-"`
DefaultVersion string `json:"default_version" bson:"default_version"`
}
2 changes: 1 addition & 1 deletion docker/base-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04
FROM ubuntu:24.04

# Non-interactive mode
ENV DEBIAN_FRONTEND=noninteractive
Expand Down
8 changes: 7 additions & 1 deletion docker/base-image/install/deps/deps.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

# 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
chmod 777 /tmp
Expand All @@ -21,4 +24,7 @@ apt-get install -y \
nginx \
unzip \
gnupg2 \
libc6
libc6

# Add source /etc/profile to ~/.bashrc
echo "source /etc/profile" >> ~/.bashrc
13 changes: 12 additions & 1 deletion docker/base-image/install/python/python.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
#!/bin/bash

version="3.12"
# Fail on error
set -e

# Get version from first argument
version="${1}"

# Check if version is provided
if [ -z "$version" ]; then
echo "Please provide a version number"
exit 1
fi

# Install build dependencies
apt-get install -y \
Expand Down Expand Up @@ -64,6 +74,7 @@ pip install -r /app/install/python/requirements.txt

# Create symbolic links
ln -sf $(pyenv which python) /usr/local/bin/python
ln -sf $(pyenv which python3) /usr/local/bin/python3
ln -sf $(pyenv which pip) /usr/local/bin/pip

# After pip install
Expand Down
122 changes: 66 additions & 56 deletions grpc/dependency_service.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions grpc/proto/services/dependency_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ message DependencyServiceConnectResponse {
string lang = 2;
string proxy = 3;
Dependency dependency = 4;
string version = 5;
}

message DependencyServiceSyncRequest {
Expand Down

0 comments on commit e77d4cd

Please sign in to comment.