23 lines
747 B
Docker
23 lines
747 B
Docker
FROM huggingface/transformers-pytorch-gpu AS requirements
|
|
RUN apt update
|
|
RUN apt install -y \
|
|
apt-transport-https ca-certificates \
|
|
curl software-properties-common
|
|
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
|
|
RUN add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
|
|
RUN apt update
|
|
RUN apt install -y docker-ce
|
|
COPY requirements.txt /requirements.txt
|
|
RUN pip3 install -r /requirements.txt
|
|
RUN rm -rf /requirements.txt
|
|
|
|
FROM requirements AS test
|
|
COPY ./ /root/sia/
|
|
WORKDIR /root/sia/
|
|
RUN mkdir -p /root/model
|
|
CMD ["python3", "-m", "unittest", "discover", "-v", "-p", "*test.py", "-v"]
|
|
|
|
FROM requirements
|
|
COPY ./ /root/sia/
|
|
WORKDIR /root/sia/
|
|
CMD ["python3", "-m", "sia"] |