Download Dockerfile from m8chaa/re-sheet: direct link, hf CLI and curl.
- Browser
- Download file 1.14 kB
-
https://huggingface.co/spaces/m8chaa/re-sheet/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/m8chaa/re-sheet/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/m8chaa/re-sheet/resolve/main/Dockerfile
1.14 kB
| FROM python:3.10 | |
| WORKDIR /code | |
| COPY ./requirements.txt /code/requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| # Create Docker secret | |
| RUN mkdir -p /app/secrets | |
| # Use the Docker secret at build time to write it to a file | |
| RUN --mount=type=secret,id=GOOGLEAPI_SECRET,mode=0444,required=true \ | |
| cat /run/secrets/GOOGLEAPI_SECRET > /app/secrets/googleapi_secret.json | |
| RUN --mount=type=secret,id=FB_SECRET,mode=0444,required=true \ | |
| cat /run/secrets/FB_SECRET > /app/secrets/fb_secret.json | |
| RUN --mount=type=secret,id=OPENAI_KEY,mode=0444,required=true \ | |
| cat /run/secrets/OPENAI_KEY > /app/secrets/openai_key.txt | |
| RUN --mount=type=secret,id=GEMINI_KEY,mode=0444,required=true \ | |
| cat /run/secrets/GEMINI_KEY > /app/secrets/gemini_key.txt | |
| RUN --mount=type=secret,id=YOUTUBE_COOKIES,mode=0444,required=true \ | |
| cat /run/secrets/YOUTUBE_COOKIES > /app/secrets/youtube_cookies.txt | |
| # Set the GOOGLE_APPLICATION_CREDENTIALS environment variable | |
| ENV GOOGLE_APPLICATION_CREDENTIALS="/app/secrets/googleapi_secret.json" | |
| COPY . . | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |