Spaces:
Runtime error
Runtime error
Download Dockerfile from Arcader7171/Critical-Dev: direct link, hf CLI and curl.
- Browser
- Download file 1.69 kB
-
https://huggingface.co/spaces/Arcader7171/Critical-Dev/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Arcader7171/Critical-Dev/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Arcader7171/Critical-Dev/resolve/main/Dockerfile
1.69 kB
| FROM python:3.13 | |
| 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_SERVICE_KEY,mode=0444 \ | |
| export SUPABASE_SERVICE_KEY=$(cat /run/secrets/SUPABASE_SERVICE_KEY) | |
| RUN --mount=type=secret,id=DB_HOST,mode=0444 \ | |
| export DB_HOST=$(cat /run/secrets/DB_HOST) | |
| RUN --mount=type=secret,id=DB_USER,mode=0444 \ | |
| export DB_USER=$(cat /run/secrets/DB_USER) | |
| RUN --mount=type=secret,id=DB_PASS,mode=0444 \ | |
| export DB_PASS=$(cat /run/secrets/DB_PASS) | |
| RUN --mount=type=secret,id=DB_NAME,mode=0444 \ | |
| export DB_NAME=$(cat /run/secrets/DB_NAME) | |
| 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 -b dev --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' |