wip docker module
This commit is contained in:
24
Dockerfile
24
Dockerfile
@@ -1,15 +1,4 @@
|
||||
FROM huggingface/transformers-pytorch-gpu AS requirements
|
||||
WORKDIR /root
|
||||
COPY requirements.txt /root/requirements.txt
|
||||
COPY ./sia/ /root/sia/
|
||||
RUN pip3 install -r requirements.txt
|
||||
|
||||
FROM requirements AS test
|
||||
COPY ./test/ /root/test/
|
||||
RUN mkdir -p /root/model
|
||||
CMD ["python3", "-m", "unittest", "discover", "-v", "-p", "*test.py", "-v"]
|
||||
|
||||
FROM requirements
|
||||
RUN apt update
|
||||
RUN apt install -y \
|
||||
apt-transport-https ca-certificates \
|
||||
@@ -18,4 +7,17 @@ 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"]
|
||||
Reference in New Issue
Block a user