Skip to content

Commit eebdff9

Browse files
committed
handled bugs in script
1 parent 5a4da1d commit eebdff9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

scripts/starter.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,24 +51,24 @@ cd src/
5151

5252
# Step 4: Build Docker image
5353
echo "Building Docker image: $DOCKER_IMAGE_NAME"
54-
docker build -f Dockerfile \
54+
sudo docker build -f Dockerfile \
5555
--build-arg REPO_URL=$GITHUB_REPO_URI \
56-
--build-arg BRANCH_NAME=$GCP_STORAGE_JSON_FILE \
56+
--build-arg BRANCH_NAME=$GITHUB_REPO_BRANCH \
5757
--build-arg GCP_STORAGE_JSON_FILE=$GCP_SECRETS_FILE \
5858
--build-arg MODELS_API_ENV_FILE=$APIKEYS_FILE \
5959
--no-cache \
6060
-t $DOCKER_IMAGE_NAME . \
61-
2>&1 | sudo tee -a "$BUILD_LOGFILE"
61+
| tee -a "$BUILD_LOGFILE"
6262

6363
# Step 5: Run container with GPU (if available)
6464
if command -v nvidia-smi &> /dev/null; then
6565
echo "Running container with GPU support..."
66-
docker run --gpus all $DOCKER_IMAGE_NAME \
67-
2>&1 | sudo tee -a "$RUN_LOGFILE"
66+
sudo docker run --gpus all $DOCKER_IMAGE_NAME \
67+
| tee -a "$RUN_LOGFILE"
6868
else
6969
echo "No GPU detected. Running container without GPU..."
70-
docker run $DOCKER_IMAGE_NAME \
71-
2>&1 | sudo tee -a "$RUN_LOGFILE"
70+
sudo docker run $DOCKER_IMAGE_NAME \
71+
| tee -a "$RUN_LOGFILE"
7272
fi
7373

7474
echo "===== Finished RLFT setup at $(date) ====="

0 commit comments

Comments
 (0)