/bin/bash: line 1: gunicorn: command not found

benzeal
HOBBY

3 months ago

I keep getting this error and i have tried all possible solutions but it ends the same
please help
below is my requirement.txt

Flask==3.0.0
opencv-python-headless
numpy==1.26.2
cloudinary==1.36.0
python-dotenv==1.0.0
Pillow==10.1.0
gunicorn==19.7.1
python-magic==0.4.27
Flask-Cors
psutil==5.9.8

# Added for PaddleOCR
paddleocr
paddlepaddle==2.6.1
onnxruntime==1.20.1   
     
and my railway.json 
{
    "$schema": "https://schema.up.railway.app/railway.schema.json",
    "build": {
        "builder": "NIXPACKS",
        "nixpacksPlan": {
            "providers": ["python"],
            "phases": {
                "setup": {
                    "nixPkgs": ["libGL", "libGLU", "mesa", "ffmpeg", "python312", "nodejs"]
                },
                "npm:install": {
                    "dependsOn": ["setup"],
                    "cmds": ["npm ci"]
                }
            }
        }
    },
    "deploy": {
        "startCommand": "gunicorn blur_service:app --bind 0.0.0.0:$PORT --timeout 360 --workers 2 --threads 4 --worker-class gthread --max-requests 1000 --max-requests-jitter 50 --preload --graceful-timeout 120 --keep-alive 5 --capture-output --enable-stdio-inheritance --log-level info",
        "restartPolicyType": "ON_FAILURE",
        "restartPolicyMaxRetries": 10,
        "healthcheckPath": "/health",
        "healthcheckTimeout": 360
    }
}
Solved

2 Replies

benzeal
HOBBY

3 months ago

hello can someone help


echohack
EMPLOYEE

3 months ago

I'm seeing that you've had a green deployment since you filed the ticket. It looks like the initial problem was that the container did not have gunicorn configured correctly as the entrypoint. Was there some additional help that you needed?


Status changed to Awaiting User Response Railway 3 months ago


Status changed to Solved echohack 3 months ago


/bin/bash: line 1: gunicorn: command not found - Railway Help Station