File tree Expand file tree Collapse file tree 4 files changed +8
-6
lines changed
Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,9 @@ COPY models /models
3030
3131# Copy and set permissions on the entrypoint script BEFORE changing user
3232COPY docker-entrypoint.sh /app/docker-entrypoint.sh
33- RUN chmod +x /app/docker-entrypoint.sh
33+ # Ensure script has Unix line endings and is executable
34+ RUN sed -i 's/\r$//' /app/docker-entrypoint.sh && \
35+ chmod +x /app/docker-entrypoint.sh
3436
3537ENV PYTHONPATH=/app
3638ENV MODEL_PATH=/models
Original file line number Diff line number Diff line change @@ -112,8 +112,8 @@ docker-build-with-model: ## Build Docker image with embedded model (use IMAGE_NA
112112 fi ; \
113113 fi
114114 @echo " Building Docker image..."
115- @docker build -t $(IMAGE_NAME ) -f Dockerfile.with-model .
116- @echo " Docker image with $( MODEL_SIZE) model built successfully as $( IMAGE_NAME) "
115+ @docker build -t $(IMAGE_NAME ) : $( MODEL_SIZE ) -f Dockerfile.with-model .
116+ @echo " Docker image with $( MODEL_SIZE) model built successfully as $( IMAGE_NAME) : $( MODEL_SIZE ) "
117117
118118docker-run : # # Run Docker container with model volume mount
119119 @echo " Checking for model files..."
Original file line number Diff line number Diff line change 1- #! /bin/bash
1+ #! /bin/sh
22set -e
33
44# Default to 1 worker if not specified
55WORKER_COUNT=${WORKER_COUNT:- 1}
66
77# Convert WORKER_COUNT to integer (handles string values from Kubernetes)
88# Use regex to validate if WORKER_COUNT is a valid number
9- if [[ " $WORKER_COUNT " =~ ^[0-9]+$ ]] ; then
9+ if [ -n " $WORKER_COUNT " ] && [ " $WORKER_COUNT " -eq " $WORKER_COUNT " ] 2> /dev/null ; then
1010 WORKER_COUNT_INT=$WORKER_COUNT
1111else
1212 echo " Warning: WORKER_COUNT '$WORKER_COUNT ' is not a valid number. Defaulting to 1."
Original file line number Diff line number Diff line change 11[project ]
22name = " babeltron"
3- version = " 0.3.6 "
3+ version = " 0.3.7 "
44dynamic = [" version" ]
55description = " A Python-based REST API that leverages single multilingual models like mBERT to provide efficient text translation services"
66authors = [
You can’t perform that action at this time.
0 commit comments