forked from idoven/Idoven-DS-Machine-Learning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (25 loc) · 1.11 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Use Python 3.10 as the base image
FROM python:3.10
# Install wget and ca-certificates
RUN apt-get update && apt-get install -y wget ca-certificates && update-ca-certificates
# Set the working directory inside the container
WORKDIR /app
# Copy the contents of the repo to the container
COPY . .
# If you want to download, remove the comment to run the data download script
# RUN chmod +x /app/data/download_data.sh
# RUN /app/data/download_data.sh
# Create and set the working directory for src
RUN mkdir -p /app/src
WORKDIR /app/src
# Install JupyterLab
RUN python3 -m pip install --upgrade pip wheel setuptools
# Install the dependencies from requirements.txt
RUN python3 -m pip install -r requirements.txt
RUN python3 -m pip install jupyterlab
# Install PyTorch with CUDA (Make sure to use the correct version)
RUN python3 -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
# Expose the port that JupyterLab will run on
EXPOSE 8888
# Define the command to run when the container starts
ENTRYPOINT ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root"]