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

Create first version of Dockerfile #18

Closed
2 tasks done
alesolano opened this issue Sep 28, 2021 · 6 comments
Closed
2 tasks done

Create first version of Dockerfile #18

alesolano opened this issue Sep 28, 2021 · 6 comments
Assignees
Labels
mlops MLOps related issues not-agent Here we don't affect the agent perse

Comments

@alesolano
Copy link
Member

alesolano commented Sep 28, 2021

Description

We need a Dockerfile. This way it'll be easier to do CI/CD workflows, train the models with AWS sagemaker and share our work to everybody.

Requirements

Nothing comes to mind right now.

Acceptance Criteria

  • Dockerfile is added and can be built.
  • python -c "import tensorflow as tf" runs successfully.
@alesolano alesolano self-assigned this Sep 28, 2021
@alesolano alesolano added the not-agent Here we don't affect the agent perse label Sep 28, 2021
@alesolano
Copy link
Member Author

alesolano commented Sep 28, 2021

The command

 python -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))"

returns

tf.Tensor(582.03674, shape=(), dtype=float32)

Doing python agent.py returns:

Loading environment football failed: No module named 'gfootball'
=== Episode 0 ===
2021-09-28 16:36:14.264100: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:185] None of the MLIR Optimization Passes are enabled (registered 2)
1/1 [==============================] - 1s 602ms/step - loss: 6.5104e-04
1/1 [==============================] - 0s 33ms/step - loss: 1.9586e-04
1/1 [==============================] - 0s 32ms/step - loss: 6.4046e-04

and on and on...


Please @DelgadoPanadero / @chucheria check that works for you.

To build it, do docker build -t clarai:dev-cpu -f Dockerfile.cpu .

To run it, do docker run -v $(pwd):/root -p 8888:8888 -it clarai:dev-cpu bash

@chucheria
Copy link
Member

Perfect. The only thing to change in the template is COPY ./requirements.txt . for COPY ./requirements_cpu.txt . in line 32, otherwise it throws an error.

Thanks so much, it works perfect.

@chucheria
Copy link
Member

Thinking about this, if we are going to have multiple requirements files, it is better to move to a new folder like:

requirements/
|_ common.txt
|_ gpu.txt
|_ dev.txt

or whatever we have.

@alesolano
Copy link
Member Author

alesolano commented Sep 28, 2021

Perfect. The only thing to change in the template is COPY ./requirements.txt . for COPY ./requirements_cpu.txt . in line 32, otherwise it throws an error.

Thanks so much, it works perfect.

True!

Thinking about this, if we are going to have multiple requirements files, it is better to move to a new folder like:

requirements/
|_ common.txt
|_ gpu.txt
|_ dev.txt

or whatever we have.

With this I'm not so sure. I'll check what the best practices are. After all, it would be just two files (requirements_cpu.txt and requirements_gpu.txt).

Though we also have two different Dockerfiles... Yep, let me check what the best practices are.

@chucheria
Copy link
Member

Great, thank you!!

@alesolano
Copy link
Member Author

Closing this and moving to #23

@alesolano alesolano added the mlops MLOps related issues label Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mlops MLOps related issues not-agent Here we don't affect the agent perse
Projects
None yet
Development

No branches or pull requests

2 participants