|
1 | 1 | # machine-learning-general-purpose |
2 | | -The GitHub repo for a Dockerhub image that will be updated as new technology is required. |
| 2 | +This is my machine learning and general utility Python image |
3 | 3 |
|
4 | | -If you are using a Microsoft Dev Container, you may want to add existing extensions. Note the `customizations:` section below: |
| 4 | +## To use the image from Dockerhub |
| 5 | +I do not manage versions of the dockerfile, so I suggest you perform the following steps: |
5 | 6 |
|
6 | | -`.devcontainer/devcontainer.json` |
| 7 | +1. In your repo, add the following line: |
7 | 8 | ``` |
8 | | -// For format details, see https://aka.ms/devcontainer.json. For config options, see the |
9 | | -// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile |
10 | | -{ |
11 | | - "name": "Existing Dockerfile", |
12 | | - "build": { |
13 | | - // Sets the run context to one level up instead of the .devcontainer folder. |
14 | | - "context": "..", |
15 | | - // Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename. |
16 | | - "dockerfile": "../Dockerfile" |
17 | | - }, |
18 | | - // Features to add to the dev container. More info: https://containers.dev/features. |
19 | | - // "features": {}, |
20 | | -
|
21 | | - // Use 'forwardPorts' to make a list of ports inside the container available locally. |
22 | | - // "forwardPorts": [], |
23 | | -
|
24 | | - // Uncomment the next line to run commands after the container is created. |
25 | | - // "postCreateCommand": "cat /etc/os-release", |
26 | | -
|
27 | | - // Configure tool-specific properties. |
28 | | - "customizations": { |
29 | | - "vscode": { |
30 | | - "extensions": [ |
31 | | - "ms-azuretools.vscode-docker", |
32 | | - "ms-toolsai.jupyter", |
33 | | - "ms-python.python" |
34 | | - ] |
35 | | - } |
36 | | - } |
37 | | -
|
38 | | - // Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root. |
39 | | - // "remoteUser": "devcontainer" |
40 | | -} |
41 | | -``` |
| 9 | +FROM billraymond/machine-learning-general-purpose:latest |
| 10 | +``` |
| 11 | +2. Copy over the `./devcontainer` folder from this repo and modify the `configure-git.sh` file to use your user.email and user.name. |
| 12 | +3. Note that you can add, remove, or modify the VSC extensions in the `./devcontainer/devcontainer.json file` |
| 13 | + |
| 14 | +## Customize this container |
| 15 | +If you want to customize the container, I recommend you download the code (ex zip file) so you can use the `./devcontainer` folder and tailor that to your needs as well. |
| 16 | + |
| 17 | +While the requirements for this image may change over time, the devcontainer will include: |
| 18 | + |
| 19 | +1. An LTS version of Ubuntu |
| 20 | +2. The latest version of Python 3 from the APT package manager |
| 21 | +3. Other items may include Git, Tensorflow, Git, h5py, SciKitLearn, and more |
| 22 | +4. Check out the Dockerfile contained in this repo for more details of what is or is not installed |
| 23 | + |
| 24 | +## Example customization |
| 25 | +Here is an example Dockerfile for another repo I manage that adds more capabilities, like OpenAI's API, tabulate, pandoc, markdown, and more. Note that it pulls from the base DockerHub container and then adds more packages to it. |
| 26 | + |
| 27 | +`Dockerfile` |
| 28 | +``` |
| 29 | +FROM billraymond/machine-learning-general-purpose:latest |
| 30 | +
|
| 31 | +# Install pillow qr code and pillow for graphics manipulation |
| 32 | +RUN pip install --no-cache-dir qrcode[pil] && \ |
| 33 | + pip install --no-cache-dir --upgrade pillow |
| 34 | +
|
| 35 | +# Install various tools in support of utilities |
| 36 | + RUN pip install --no-cache-dir python-pptx \ |
| 37 | + openai \ |
| 38 | + tabulate \ |
| 39 | + pandoc \ |
| 40 | + markdown2 \ |
| 41 | + pdfkit \ |
| 42 | + beautifulsoup4 |
| 43 | +RUN apt-get update |
| 44 | +RUN apt-get install -y wkhtmltopdf |
| 45 | +
|
| 46 | +RUN rm -rf /var/lib/apt/lists/* |
| 47 | +``` |
| 48 | + |
| 49 | +## Feedback |
| 50 | +This is a genearl purpose solution for me, but if you have some ideas or recommendations, feel free to submit a pull request or open an issue. |
0 commit comments