theresatvan commited on
Commit
0fb0bdd
1 Parent(s): 2a11a7e

Use PyTorch image

Browse files
.devcontainer/Dockerfile CHANGED
@@ -1,17 +1,20 @@
1
- FROM python:3.10-slim
 
 
2
 
3
  WORKDIR /app
4
 
5
  COPY . /app/
6
 
7
  RUN apt-get update && apt-get install -y \
 
8
  build-essential \
9
  curl \
10
  software-properties-common \
11
  git \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
- RUN pip install -r /app/requirements.txt
15
 
16
  EXPOSE 8501
17
 
1
+ FROM pytorch/pytorch:1.13.1-cuda11.6-cudnn8-runtime
2
+
3
+ ENV DEBIAN_FRONTEND=noninteractive
4
 
5
  WORKDIR /app
6
 
7
  COPY . /app/
8
 
9
  RUN apt-get update && apt-get install -y \
10
+ python3-pip \
11
  build-essential \
12
  curl \
13
  software-properties-common \
14
  git \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
+ RUN pip3 install -r /app/requirements.txt
18
 
19
  EXPOSE 8501
20
 
.devcontainer/devcontainer.json CHANGED
@@ -3,6 +3,15 @@
3
  "dockerfile": "Dockerfile",
4
  "context": ".."
5
  },
 
 
 
 
 
 
 
 
 
6
  "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind",
7
  "workspaceFolder": "/workspace",
8
  "postStartCommand": "echo 'Docker container started...'"
3
  "dockerfile": "Dockerfile",
4
  "context": ".."
5
  },
6
+ "name": "PyTorch DevContainer",
7
+ "runArgs": [
8
+ "--gpus=all",
9
+ "--shm-size=16gb",
10
+ "--ipc=host"
11
+ ],
12
+ "mounts": [
13
+ "source=${localEnv:USERPROFILE}/Desktop/workspace/NYU/Artificial Intelligence/cs-gy-6613-assignments/patent_lang_model,target=/app,type=bind,consistency=cached"
14
+ ],
15
  "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind",
16
  "workspaceFolder": "/workspace",
17
  "postStartCommand": "echo 'Docker container started...'"