GreenWizard2015's picture
Upload Dockerfile
d0056da
raw
history blame contribute delete
No virus
1.1 kB
# Very weird Dockerfile, which is clone my repo and run application
# I just don't want to maintain multiple repos and other sht
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
RUN --mount=target=pre-requirements.txt,source=pre-requirements.txt pip install --no-cache-dir -r pre-requirements.txt
RUN pip install --no-cache-dir gradio tensorflow tensorflow-probability opencv-python wandb
# 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/dog-breed-classification/git/ref/heads/main" skipcache
RUN git clone https://github.com/GreenWizard2015/dog-breed-classification/ && \
cp -r dog-breed-classification/* . && \
rm -rf dog-breed-classification && \
pip install --no-cache-dir -r requirements.txt
CMD ["python", "app.py", "--host", "0.0.0.0", "--port", "7860"]