Skip to content

Commit

Permalink
Fix attempt at model download into container
Browse files Browse the repository at this point in the history
  • Loading branch information
andreped committed May 24, 2023
1 parent 6209ec6 commit d46f53d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ build/
dist/
livermask.egg-info/
*.DS_Store
*.h5
*.npz
*.nii
*__pycache__/
.idea/
Expand Down
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ RUN python3.7 -m pip install --force-reinstall typing_extensions==4.0.0
# Install wget
RUN apt install wget -y

# Download pretrained parenchyma model
RUN wget "https://github.com/andreped/livermask/releases/download/trained-models-v1/model.h5"
COPY --chown=user ./model.h5 /code/model.h5
RUN ls -la

# Set up a new user named "user" with user ID 1000
RUN useradd -m -u 1000 user
Expand All @@ -52,4 +50,7 @@ WORKDIR $HOME/app
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
COPY --chown=user . $HOME/app

# Download pretrained parenchyma model
RUN wget "https://github.com/andreped/livermask/releases/download/trained-models-v1/model.h5"

CMD ["python3.7", "demo/app.py"]

0 comments on commit d46f53d

Please sign in to comment.