Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DA2Song
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Lei Xiao
DA2Song
Commits
33d05ab2
There was an error fetching the commit references. Please try again later.
Commit
33d05ab2
authored
1 year ago
by
Lei Xiao
Browse files
Options
Downloads
Patches
Plain Diff
new file: dockerfile
parent
08a3b0fe
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dockerfile
+44
-0
44 additions, 0 deletions
dockerfile
with
44 additions
and
0 deletions
dockerfile
0 → 100644
+
44
−
0
View file @
33d05ab2
# Use Jupyter's official container as base image
FROM
jupyter/base-notebook:latest
# Set the working directory in the container
WORKDIR
/app
# Copy the contents of the binder directory into the container
COPY
binder /tmp/binder
# Install all modules required for package installation in Ubuntu
RUN
apt-get update
&&
\
apt-get
install
-y
--no-install-recommends
$(
cat
/tmp/binder/apt.txt
)
&&
\
rm
-rf
/var/lib/apt/lists/
*
# Install Conda and create a conda environment called "d2s"
RUN
conda create
--name
d2s
python
=
3.9
-y
# Activate the "d2s" conda environment
SHELL
["conda", "run", "-n", "d2s", "/bin/bash", "-c"]
# Install Python packages listed in requirements.txt
COPY
binder/requirements.txt /tmp/requirements.txt
RUN
pip
install
--no-cache-dir
-r
/tmp/requirements.txt
# Install R version specified in the runtime.txt and R packages listed in install.R
COPY
binder/runtime.txt /tmp/runtime.txt
COPY
binder/install.R /tmp/install.R
RUN
Rscript /tmp/install.R
# Install IRkernel and IPykernel
RUN
conda
install
-c
conda-forge r-irkernel
-y
RUN
conda
install
ipykernel
-y
# Copy Jupyter notebooks, data, results, and scripts into the container
COPY
./*.ipynb /app/
COPY
data /app/data
COPY
results /app/results
COPY
scripts /app/scripts
# Configure Jupyter notebook port and command
EXPOSE
8888
# Start Jupyter Notebook server
CMD
["jupyter", "notebook", "--ip=0.0.0.0", "--port=8888", "--allow-root"]
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment