-
Notifications
You must be signed in to change notification settings - Fork 63
/
test4.Dockerfile
54 lines (43 loc) · 1.33 KB
/
test4.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM ubuntu:22.04
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
# Update and install common packages (same as base)
RUN apt-get update && apt-get install -y \
python3.10 \
python3-pip \
curl \
wget \
git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install common Python packages (same as base)
RUN pip3 install --no-cache-dir --upgrade pip && \
pip3 install --no-cache-dir \
numpy \
pandas \
scikit-learn \
matplotlib
# Install additional packages
RUN apt-get update && apt-get install -y \
nodejs \
npm \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install TensorFlow and Keras
RUN pip3 install --no-cache-dir tensorflow keras
# Install PyTorch
RUN pip3 install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
# Install some Node.js packages globally
RUN npm install -g \
express \
lodash \
moment
# Create large files to simulate longer build time
RUN dd if=/dev/urandom of=/large_file_1 bs=1M count=500 && \
dd if=/dev/urandom of=/large_file_2 bs=1M count=500 && \
rm /large_file_1 /large_file_2
# Set working directory
WORKDIR /app
# Create a simple Python script that uses one of the new packages
RUN echo 'import tensorflow as tf; print(f"TensorFlow version: {tf.__version__}")' > tf_version.py
CMD ["python3", "tf_version.py"]