Skip to content

Commit

Permalink
Update docker scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
twinkarma committed Jun 1, 2024
1 parent 68c36ed commit 6629731
Show file tree
Hide file tree
Showing 4 changed files with 1,211 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ node_modules/

\.vscode/


.env
notebooks/__pycache__/

notebooks/cifar-10-batches-py/
Expand Down
18 changes: 8 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
FROM python:3.8-slim-bookworm as build

WORKDIR /home/dlcourse
FROM tensorflow/tensorflow:2.16.1-gpu

RUN apt update && apt-get install -y wget \
gcc \
bzip2

RUN pip install jupyter
WORKDIR /course_setup
COPY requirements.txt .
RUN pip install -r requirements.txt

RUN adduser --disabled-password dlcourse
WORKDIR /root/.jupyter
COPY jupyter_lab_config.py .

WORKDIR /dlcourse
COPY notebooks/python .

RUN chown -R dlcourse:dlcourse ./

EXPOSE 8888

USER dlcourse

ENTRYPOINT ["jupyter", "lab", "--ip=0.0.0.0", "--no-browser", "--ServerApp.token='f9a3bd4e9f2c3be01cd629154cfb224c2703181e050254b5'", "/home/dlcourse"]
ENTRYPOINT jupyter lab --no-browser /dlcourse
11 changes: 8 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# change to tag :latest, port 5000, and uncomment extra hosts for prod
version: "2.3"

services:
dljupyter:
build: .
restart: always
ports:
- "80:8888"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [ gpu ]
Loading

0 comments on commit 6629731

Please sign in to comment.