Download Dockerfile from sfun/raycast: direct link, hf CLI and curl.
- Browser
- Download file 905 Bytes
-
https://huggingface.co/spaces/sfun/raycast/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/sfun/raycast/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/sfun/raycast/resolve/main/Dockerfile
905 Bytes
| # build stage | |
| FROM python:3.10 AS builder | |
| # install PDM | |
| RUN pip install -U pip setuptools wheel | |
| RUN pip install pdm | |
| # install dependencies and project into the local packages directory | |
| WORKDIR /project | |
| RUN git clone https://github.com/yufeikang/raycast_api_proxy.git . | |
| RUN mkdir __pypackages__ && pdm install --prod --no-lock --no-editable | |
| # run stage | |
| FROM python:3.10-slim | |
| WORKDIR /project | |
| # retrieve packages from build stage | |
| ENV PYTHONPATH=/project/pkgs | |
| RUN chmod 777 -R /project | |
| RUN mkdir -p ./sync && chmod 777 -R ./sync | |
| COPY --from=builder /project/__pypackages__/3.10/lib /project/pkgs | |
| COPY --from=builder /project/app /project/app | |
| RUN chmod 777 -R /project/app | |
| RUN sed -i 's|headers=headers,|headers={"Authorization": f"Bearer {token}","Accept": "application/json",},|g' /project/app/middleware.py | |
| EXPOSE 3000 | |
| CMD ["sh", "-c", "python -m uvicorn app.main:app --host 0.0.0.0 --port 3000"] |