-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
S61: Reorganizing files to optimize docker caching layers (#920)
* First batch of changes to Dockerfiles. Testing, but want to track changes * combining run commands * second batch of changes. making layers more efficient * avoiding tzdata prompts * testing a way to obtain faster build times * reverting.
- Loading branch information
1 parent
9593698
commit 25eccce
Showing
24 changed files
with
112 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
FROM pytorch/pytorch:1.13.0-cuda11.6-cudnn8-runtime | ||
|
||
COPY /preprocessors/depth-map-gen/requirements.txt /app/requirements.txt | ||
|
||
#system dependencies | ||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y python3-opencv wget git && rm -rf /var/lib/apt/lists/* | ||
|
||
#user/environment setup | ||
RUN adduser --disabled-password python | ||
WORKDIR /app | ||
ENV PATH="/home/python/.local/bin:${PATH}" | ||
ENV PYTHONPATH "${PYTHONPATH}:./AdelaiDepth/LeReS/Minist_Test/" | ||
ENV FLASK_APP=depth-map-generator.py | ||
ENV TORCH_HOME=/app | ||
|
||
RUN git clone https://github.com/aim-uofa/AdelaiDepth | ||
RUN wget -O ./res101.pth https://huggingface.co/ffranchina/LeReS/resolve/main/res101.pth | ||
RUN pip3 install --upgrade pip | ||
RUN pip3 install -r /app/requirements.txt | ||
#python dependencies | ||
COPY /preprocessors/depth-map-gen/requirements.txt /app/requirements.txt | ||
RUN pip3 install --upgrade pip && \ | ||
pip3 install -r /app/requirements.txt | ||
|
||
#schema | ||
COPY /schemas /app/schemas | ||
|
||
#model download, app code | ||
RUN git clone https://github.com/aim-uofa/AdelaiDepth && \ | ||
wget -O ./res101.pth https://huggingface.co/ffranchina/LeReS/resolve/main/res101.pth | ||
COPY /preprocessors/depth-map-gen/ /app | ||
|
||
EXPOSE 5000 | ||
ENV FLASK_APP=depth-map-generator.py | ||
ENV TORCH_HOME=/app | ||
|
||
USER python | ||
CMD [ "gunicorn", "depth-map-generator:app", "-b", "0.0.0.0:5000", "--capture-output", "--log-level=debug" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.