Skip to content

Commit e371f69

Browse files
Fixed Docker to work for AMD64 architecture
1 parent 4e66f44 commit e371f69

File tree

12 files changed

+254
-271
lines changed

12 files changed

+254
-271
lines changed

.devcontainer/Dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
FROM ubuntu:22.04
33

44
# Set environment variables for Conda
5-
ENV PATH /opt/conda/bin:$PATH
5+
ENV PATH=/opt/conda/bin:$PATH
66
ENV MYSQL_ROOT_PASSWORD=dj_secret123
77
ENV DJ_HOST=localhost
88
ENV DJ_PASS=$MYSQL_ROOT_PASSWORD
@@ -21,7 +21,15 @@ RUN apt-get update && apt-get install -y \
2121
&& rm -rf /var/lib/apt/lists/*
2222

2323
# Download and install Miniconda
24-
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && \
24+
RUN ARCH=$(uname -m) && \
25+
if [ "$ARCH" = "x86_64" ]; then \
26+
MINICONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh"; \
27+
elif [ "$ARCH" = "aarch64" ]; then \
28+
MINICONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh"; \
29+
else \
30+
echo "Unsupported architecture: $ARCH" && exit 1; \
31+
fi && \
32+
wget --quiet $MINICONDA_URL -O /tmp/miniconda.sh && \
2533
/bin/bash /tmp/miniconda.sh -b -p /opt/conda && \
2634
rm /tmp/miniconda.sh && \
2735
conda config --set auto_update_conda false && \

.devcontainer/devcontainer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,16 @@
88
"vscode": {
99
"settings": {
1010
"terminal.integrated.shell.linux": "/bin/bash"
11+
"python.defaultInterpreterPath": "/opt/conda/bin/python",
12+
"python.terminal.activateEnvironment": false // since conda is auto-activated
1113
},
1214
"extensions": [
1315
"ms-python.python",
1416
"ms-toolsai.jupyter",
1517
"ms-azuretools.vscode-docker"
18+
"ExecutableBookProject.myst-highlight", // MyST syntax highlighting
19+
"ms-python.black-formatter", // Python formatting
20+
"ms-vscode.vscode-json" // JSON support
1621
]
1722
}
1823
},

.github/workflows/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
uses: actions/setup-node@v4
3535
with:
3636
node-version: '20' # Using a more current LTS version
37-
cache: 'npm' # ⚡️ Cache npm packages for faster subsequent runs
37+
cache: 'npm' # Cache npm packages for faster subsequent runs
3838

3939
- name: Install MyST Markdown
4040
run: npm install -g mystmd
@@ -48,6 +48,7 @@ jobs:
4848
uses: actions/upload-pages-artifact@v3
4949
with:
5050
path: './book/_build/html'
51+
retention-days: 1 # save storage
5152

5253
deploy:
5354
# Requires the build job to succeed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[![License: CC BY-NC-ND 4.0](https://img.shields.io/badge/License-CC%20BY--NC--ND%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc-nd/4.0/)
2+
[![Build and Deploy](https://github.com/dimitri-yatsenko/datajoint-book/actions/workflows/main.yml/badge.svg)](https://github.com/dimitri-yatsenko/datajoint-book/actions/workflows/main.yml)
23

34
# DataJoint Book
45

@@ -7,9 +8,9 @@ introduction to relational database programming in the context of scientific com
78

89
# License
910

10-
© DataJoint Inc., 2024--2025, All rights reserved.
11+
© DataJoint Inc., 2024-2025, All rights reserved.
1112

12-
This work is licensed under the [Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License](LICENSE.md).
13+
This work is licensed under the [CC BY-NC-ND 4.0 License](LICENSE.md).
1314
You may share the content as long as you
1415
* give appropriate credit
1516
* do not use it for commercial purposes

book/00-introduction/00-purpose.md

Lines changed: 24 additions & 59 deletions
Large diffs are not rendered by default.

book/35-example-designs/015-university-database.ipynb

Lines changed: 206 additions & 200 deletions
Large diffs are not rendered by default.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)