File size: 816 Bytes
d4cb9fa
 
 
 
 
 
 
 
 
 
 
 
 
b5db862
d4cb9fa
 
 
1267502
b5db862
 
d4cb9fa
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM python:3.10

# Some stuff to make it work on Hugging Face
RUN apt-get update && apt-get install -y libsm6 libxext6 cmake libgl1-mesa-glx

# Set up environment
COPY --link --chown=1000 ./ /home/user/app
WORKDIR /home/user/app
RUN useradd -m -u 1000 user && cd /home/user/app
USER user
ENV PATH=/home/user/.local/bin:$PATH

# Clone the repo and install the requirements
#ADD "https://api.github.com/repos/GreenWizard2015/FranNet/git/ref/heads/main" skipcache
RUN git clone https://github.com/GreenWizard2015/FranNet/ && \
    cp -r FranNet/huggingface/* . && rm -rf FranNet/huggingface && \
    cp -r FranNet/* . && \
    rm -rf FranNet
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir -r requirements-huggingface.txt
    
CMD ["python", "app.py", "--host", "0.0.0.0", "--port", "7860"]