Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker image #81

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add docker image
  • Loading branch information
lilianabs committed Apr 2, 2023
commit 435eb16a4cc4eab0ba1da0fbccbd90ae04d68563
15 changes: 15 additions & 0 deletions docker-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM python:3.7
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See if you can make this python version configurable that you can pass it via the shell script or environment variable.

If you look into the docker shell scripts in any of these examples here, you can see how it's done.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for pointing this out. I've updated the Dockerfile to pass the argument via the shell script.


Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to get familiar with hadolint and apply it to your Dockerfile to see what suggestions it gives you in terms of improving the code, here's a post to learn more about it

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've used hadolint to format the Dockerfile accordingly :)

RUN apt-get update && apt-get install -y git

RUN git clone https://github.com/neomatrix369/nlp_profiler.git
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of doing this try to see if you can actually use the local folder and the code downloaded in it - there is an advantage and purpose for doing it.

See how it has been done here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the suggestion Mani. I've updated the file so it uses the local folder.


WORKDIR nlp_profiler

ADD app.py .

RUN pip install -r requirements-dev.txt

RUN pip install -r requirements.txt

RUN pip install -r requirements-nix-dev.txt