Spaces:
Sleeping
Sleeping
File size: 911 Bytes
43dfddb 60e5026 7a89c8b 60e5026 7a89c8b 30122c4 be33b14 30122c4 43dfddb 30122c4 43dfddb 30122c4 60e5026 1bb9119 5c41e9e eab0075 1bb9119 5c41e9e eab0075 1bb9119 43dfddb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
FROM python
COPY requirements.txt /app/requirements.txt
WORKDIR /app
RUN pip install -r requirements.txt
RUN playwright install-deps
RUN --mount=type=secret,id=HF_EMAIL,mode=0444,required=true \
cat /run/secrets/HF_EMAIL
RUN --mount=type=secret,id=HF_PASS,mode=0444,required=true \
cat /run/secrets/HF_PASS
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
RUN playwright install
COPY --chown=user . $HOME/app
WORKDIR $HOME/app/pragetx_scraper
RUN scrapy crawl pages && \
cd $HOME/app && \
python setup.py
WORKDIR $HOME/app
RUN --mount=type=secret,id=HF_EMAIL,mode=0444,required=true \
cat /run/secrets/HF_EMAIL > $HOME/app/.env &&\
cat $HOME/app/.env
RUN --mount=type=secret,id=HF_PASS,mode=0444,required=true \
cat /run/secrets/HF_PASS >> $HOME/app/.env &&\
$HOME/app/.env
EXPOSE 7860
CMD ["python", "main.py"]
|