Skip to content

Commit fbe8d28

Browse files
authored
Merge pull request #46 from deepnote/andrej/pla-3234-cleanup-data-science-image-use-constraintstxt-from-latest
Cleanup documentation & datascience image
2 parents e4f0a2c + cf8204b commit fbe8d28

File tree

9 files changed

+60
-232
lines changed

9 files changed

+60
-232
lines changed

ir/ir-base/readme.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Quick Reference
2+
- **Maintained by**: [Deepnote](https://deepnote.com/)
3+
4+
## IR Tags
5+
- [`4.0.3`, `4.2.0`]
6+
7+
## What is Deepnote IR?
8+
Deepnote IR provides official Docker images that are pre-configured for use on [Deepnote](https://deepnote.com). These images include the R programming language installed in specific versions, along with the [IRkernel](https://github.com/IRkernel/IRkernel), which is an R kernel for Jupyter.
9+
10+
These images are designed to facilitate seamless integration with Deepnote's platform, allowing users to leverage R for data analysis and visualization within Jupyter notebooks. If you find that the provided images do not meet all your requirements, you are encouraged to extend them by building your own custom images on top of these bases.
11+
12+
## How to Customize Your Image
13+
To create a custom Docker image based on Deepnote's IR images, you can use the following example Dockerfile:
14+
15+
```dockerfile
16+
FROM deepnote/ir:4.2.0
17+
18+
RUN R -e "install.packages('tidyverse', repos='https://cloud.r-project.org', dependencies=TRUE)"
19+
```
20+
21+
This example demonstrates how to build upon the `deepnote/ir:4.2.0` image by installing the tidyverse package, a collection of R packages designed for data science. You can modify this Dockerfile to include other R packages or configurations as needed.
22+
23+
# Additional Information
24+
These images serve as a robust foundation for R-based data science projects within Deepnote, providing the necessary tools and libraries to get started quickly. For more detailed information about Deepnote and how these images can enhance your data science workflows, please visit Deepnote's website.
25+

python/datascience/Dockerfile.datascience

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,20 @@ ARG PYTHON_VERSION=3.8
22
ARG CIRCLE_PULL_REQUEST
33
FROM deepnote/python:${PYTHON_VERSION}${CIRCLE_PULL_REQUEST:+-ra-${CIRCLE_PULL_REQUEST##*/}}
44

5-
RUN pip install --upgrade pip
6-
7-
85
# Add the requirements files
96
ADD requirements-3.11+.txt /requirements-3.11+.txt
107
ADD requirements-below-3.11.txt /requirements-below-3.11.txt
11-
ADD constraints.txt /constraints.txt
128

139
#Determine the Python version and set the version-specifications file
1410
ARG PYTHON_VERSION
1511

16-
RUN python -m pip install --upgrade setuptools pip
17-
1812
RUN if [ "$(printf '%s\n' "$PYTHON_VERSION" "3.11" | sort -V | head -n1)" = "3.11" ]; then \
1913
mv "requirements-3.11+.txt" "requirements.txt" \
2014
; else \
2115
mv "requirements-below-3.11.txt" "requirements.txt" \
2216
; fi
2317

24-
# Install dependencies
25-
# Combine all RUN commands into one to minimize the number of layers
26-
RUN apt-get update \
27-
&& apt-get install -y --no-install-recommends gcc \
28-
&& pip install --no-cache-dir -r requirements.txt -c constraints.txt \
29-
&& apt-get purge -y gcc \
30-
&& apt-get autoremove -y \
31-
&& apt-get clean \
32-
&& rm -rf /var/lib/apt/lists/* /root/.cache
18+
19+
RUN python -m venv --system-site-packages ~/venv
20+
RUN . ~/venv/bin/activate \
21+
&& pip install --no-cache-dir -r requirements.txt -c https://tk.deepnote.com/constraints${PYTHON_VERSION}.txt

python/datascience/constraints.txt

Lines changed: 0 additions & 147 deletions
This file was deleted.

python/python/Dockerfile.python3.10

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,3 @@ RUN set -eux; \
111111
ln -svT "$src" "/usr/local/bin/$dst"; \
112112
done
113113

114-
115-
# We create the virtual environment in the home directory in the Dockerfile
116-
# for performance improvement.
117-
RUN python -m venv --system-site-packages ~/venv

python/python/Dockerfile.python3.11

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,3 @@ RUN set -eux; \
110110
ln -svT "$src" "/usr/local/bin/$dst"; \
111111
done
112112

113-
114-
# We create the virtual environment in the home directory in the Dockerfile
115-
# for performance improvement.
116-
RUN python -m venv --system-site-packages ~/venv

python/python/Dockerfile.python3.8

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,3 @@ RUN set -eux; \
109109
[ ! -e "/usr/local/bin/$dst" ]; \
110110
ln -svT "$src" "/usr/local/bin/$dst"; \
111111
done
112-
113-
114-
115-
# We create the virtual environment in the home directory in the Dockerfile
116-
# for performance improvement.
117-
RUN python -m venv --system-site-packages ~/venv

python/python/Dockerfile.python3.9

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,3 @@ RUN set -eux; \
109109
[ ! -e "/usr/local/bin/$dst" ]; \
110110
ln -svT "$src" "/usr/local/bin/$dst"; \
111111
done
112-
113-
114-
# We create the virtual environment in the home directory in the Dockerfile
115-
# for performance improvement.
116-
RUN python -m venv --system-site-packages ~/venv

python/readme.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Quick Reference
2+
- **Maintained by**: [Deepnote](https://deepnote.com/)
3+
4+
# Supported Tags and Respective Dockerfile Links
5+
- [`3.8`, `3.9`, `3.10`, `3.11`](https://github.com/deepnote/environments/tree/main/python/python)
6+
- [`3.8-datascience`, `3.9-datascience`, `3.10-datascience`, `3.11-datascience`](https://github.com/deepnote/environments/blob/main/python/datascience/Dockerfile.datascience)
7+
8+
# What is Deepnote Python?
9+
Deepnote Python is a set of Docker images tailored for use in the Deepnote platform. These images are based on the official [Python Docker images](https://hub.docker.com/_/python) and include additional binaries and configurations to enhance the user experience within Deepnote. They are designed to simplify development workflows, especially for data science projects, by providing pre-configured environments that are ready to use.
10+
11+
# How to Use This Image
12+
13+
## Create Custom Dockerfile for Deepnote Use
14+
To create a custom Dockerfile using Deepnote's Python image, you can start with the following template:
15+
16+
```dockerfile
17+
ARG PYTHON_VERSION=3.9
18+
FROM deepnote/python:$PYTHON_VERSION
19+
20+
#Determine the Python version and set the version-specifications file
21+
ARG PYTHON_VERSION
22+
23+
COPY requirements.txt ./
24+
RUN pip install --no-cache-dir -r requirements.txt -c https://tk.deepnote.com/constraints${PYTHON_VERSION}.txt
25+
```
26+
27+
This Dockerfile uses the `deepnote/python:3.9` image as a base and installs Python packages specified in requirements.txt. The use of constraints from `https://tk.deepnote.com/constraints<python_version>.txt` ensures compatibility and stability of package installations.
28+
29+
# Additional Information
30+
These images are intended to serve as a starting point for creating reproducible and scalable data science environments in Deepnote. They include various utilities and binaries that streamline workflows, such as Jupyter support, data visualization tools, and more.
31+
For more information about Deepnote and how these images can be used to enhance your data science projects, visit Deepnote's website.

readme.md

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)