Spaces:
Runtime error
Runtime error
Download Dockerfile from Arcader7171/Critical: direct link, hf CLI and curl.
- Browser
- Download file 2.12 kB
-
https://huggingface.co/spaces/Arcader7171/Critical/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Arcader7171/Critical/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Arcader7171/Critical/resolve/main/Dockerfile
2.12 kB
| FROM python:3.11 | |
| RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| # pull requirements.txt | |
| WORKDIR /app | |
| COPY --chown=user ./requirements.txt /app/requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| # Set ENV Vars | |
| RUN --mount=type=secret,id=SUPABASE_URL,mode=0444 \ | |
| export SUPABASE_URL=$(cat /run/secrets/SUPABASE_URL) | |
| RUN --mount=type=secret,id=SUPABASE_PUBLIC_KEY,mode=0444 \ | |
| export SUPABASE_PUBLIC_KEY=$(cat /run/secrets/SUPABASE_PUBLIC_KEY) | |
| RUN --mount=type=secret,id=SUPABASE_SERVICE_KEY,mode=0444 \ | |
| export SUPABASE_SERVICE_KEY=$(cat /run/secrets/SUPABASE_SERVICE_KEY) | |
| RUN --mount=type=secret,id=JWTKey,mode=0444 \ | |
| export JWTKey=$(cat /run/secrets/JWTKey) | |
| RUN --mount=type=secret,id=FLASK_KEY,mode=0444 \ | |
| export FLASK_KEY=$(cat /run/secrets/FLASK_KEY) | |
| RUN --mount=type=secret,id=REDIS_URL,mode=0444 \ | |
| export REDIS_URL=$(cat /run/secrets/REDIS_URL) | |
| RUN --mount=type=secret,id=BREVO_API_KEY,mode=0444 \ | |
| export BREVO_API_KEY=$(cat /run/secrets/BREVO_API_KEY) | |
| RUN --mount=type=secret,id=FF_URL,mode=0444 \ | |
| export FF_URL=$(cat /run/secrets/FF_URL) | |
| RUN --mount=type=secret,id=FF_KEY,mode=0444 \ | |
| export FF_KEY=$(cat /run/secrets/FF_KEY) | |
| RUN --mount=type=secret,id=SENTRY_URL,mode=0444 \ | |
| export SENTRY_URL=$(cat /run/secrets/SENTRY_URL) | |
| RUN --mount=type=secret,id=ENVIRONMENT,mode=0444 \ | |
| export ENVIRONMENT=$(cat /run/secrets/ENVIRONMENT) | |
| # Use the access token to secretly pull the repo | |
| #ARG CACHEBUST=1 | |
| WORKDIR /app | |
| RUN --mount=type=secret,id=GITLAB_ACCESS_TOKEN,mode=0444,required=true \ | |
| echo "Current time: $(date +%Y-%m-%dT%H:%M:%S%z)" && \ | |
| git clone --depth 1 https://nevronline:$(cat /run/secrets/GITLAB_ACCESS_TOKEN)@gitlab.com/nevronline/interstate.git | |
| # Move to project dir | |
| WORKDIR /app/interstate | |
| RUN git log -n 1 | |
| RUN mv /app/interstate/* /app | |
| RUN ls -a /app/interstate | |
| RUN rm -rf /app/interstate | |
| WORKDIR /app | |
| COPY --chown=user . /app/interstate | |
| CMD gunicorn -w 1 -k geventwebsocket.gunicorn.workers.GeventWebSocketWorker -b 0.0.0.0:7860 'app:app' |