Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
25 changes: 25 additions & 0 deletions ir/ir-base/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Quick Reference
- **Maintained by**: [Deepnote](https://deepnote.com/)

## IR Tags
- [`4.0.3`, `4.2.0`]

## What is Deepnote IR?
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.

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.

## How to Customize Your Image
To create a custom Docker image based on Deepnote's IR images, you can use the following example Dockerfile:

```dockerfile
FROM deepnote/ir:4.2.0

RUN R -e "install.packages('tidyverse', repos='https://cloud.r-project.org', dependencies=TRUE)"
```

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.

# Additional Information
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.

19 changes: 4 additions & 15 deletions python/datascience/Dockerfile.datascience
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,20 @@ ARG PYTHON_VERSION=3.8
ARG CIRCLE_PULL_REQUEST
FROM deepnote/python:${PYTHON_VERSION}${CIRCLE_PULL_REQUEST:+-ra-${CIRCLE_PULL_REQUEST##*/}}

RUN pip install --upgrade pip


# Add the requirements files
ADD requirements-3.11+.txt /requirements-3.11+.txt
ADD requirements-below-3.11.txt /requirements-below-3.11.txt
ADD constraints.txt /constraints.txt

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

RUN python -m pip install --upgrade setuptools pip

RUN if [ "$(printf '%s\n' "$PYTHON_VERSION" "3.11" | sort -V | head -n1)" = "3.11" ]; then \
mv "requirements-3.11+.txt" "requirements.txt" \
; else \
mv "requirements-below-3.11.txt" "requirements.txt" \
; fi

# Install dependencies
# Combine all RUN commands into one to minimize the number of layers
RUN apt-get update \
&& apt-get install -y --no-install-recommends gcc \
&& pip install --no-cache-dir -r requirements.txt -c constraints.txt \
&& apt-get purge -y gcc \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /root/.cache

RUN python -m venv --system-site-packages ~/venv
RUN . ~/venv/bin/activate \
&& pip install --no-cache-dir -r requirements.txt -c https://tk.deepnote.com/constraints${PYTHON_VERSION}.txt
147 changes: 0 additions & 147 deletions python/datascience/constraints.txt

This file was deleted.

4 changes: 0 additions & 4 deletions python/python/Dockerfile.python3.10
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,3 @@ RUN set -eux; \
ln -svT "$src" "/usr/local/bin/$dst"; \
done


# We create the virtual environment in the home directory in the Dockerfile
# for performance improvement.
RUN python -m venv --system-site-packages ~/venv
4 changes: 0 additions & 4 deletions python/python/Dockerfile.python3.11
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,3 @@ RUN set -eux; \
ln -svT "$src" "/usr/local/bin/$dst"; \
done


# We create the virtual environment in the home directory in the Dockerfile
# for performance improvement.
RUN python -m venv --system-site-packages ~/venv
6 changes: 0 additions & 6 deletions python/python/Dockerfile.python3.8
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,3 @@ RUN set -eux; \
[ ! -e "/usr/local/bin/$dst" ]; \
ln -svT "$src" "/usr/local/bin/$dst"; \
done



# We create the virtual environment in the home directory in the Dockerfile
# for performance improvement.
RUN python -m venv --system-site-packages ~/venv
5 changes: 0 additions & 5 deletions python/python/Dockerfile.python3.9
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,3 @@ RUN set -eux; \
[ ! -e "/usr/local/bin/$dst" ]; \
ln -svT "$src" "/usr/local/bin/$dst"; \
done


# We create the virtual environment in the home directory in the Dockerfile
# for performance improvement.
RUN python -m venv --system-site-packages ~/venv
Copy link
Contributor

Choose a reason for hiding this comment

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

@chudyandrej what would happen in the datascience images, if we keep it here as well?

31 changes: 31 additions & 0 deletions python/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Quick Reference
- **Maintained by**: [Deepnote](https://deepnote.com/)

# Supported Tags and Respective Dockerfile Links
- [`3.8`, `3.9`, `3.10`, `3.11`](https://github.com/deepnote/environments/tree/main/python/python)
- [`3.8-datascience`, `3.9-datascience`, `3.10-datascience`, `3.11-datascience`](https://github.com/deepnote/environments/blob/main/python/datascience/Dockerfile.datascience)

# What is Deepnote Python?
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.

# How to Use This Image

## Create Custom Dockerfile for Deepnote Use
To create a custom Dockerfile using Deepnote's Python image, you can start with the following template:

```dockerfile
ARG PYTHON_VERSION=3.9
FROM deepnote/python:$PYTHON_VERSION

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

COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt -c https://tk.deepnote.com/constraints${PYTHON_VERSION}.txt
```

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.

# Additional Information
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.
For more information about Deepnote and how these images can be used to enhance your data science projects, visit Deepnote's website.
51 changes: 0 additions & 51 deletions readme.md

This file was deleted.