forked from Lancelot39/Causal-Copilot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.cpu
More file actions
51 lines (38 loc) · 1.21 KB
/
Dockerfile.cpu
File metadata and controls
51 lines (38 loc) · 1.21 KB
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
FROM --platform=linux/amd64 pytorch/pytorch:2.2.2-cuda11.8-cudnn8-runtime AS cpu-base
ENV DEBIAN_FRONTEND=noninteractive
USER root
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y tzdata
RUN apt-get update && apt-get install -y \
build-essential \
wget \
perl \
graphviz \
git \
vim \
&& rm -rf /var/lib/apt/lists/*
# Install TinyTeX
RUN rm -rf ~/.TinyTeX && \
wget -qO- "https://yihui.org/tinytex/install-bin-unix.sh" | sh && \
echo 'export PATH="$PATH:$HOME/.TinyTeX/bin/x86_64-linux"' >> ~/.bashrc && \
. ~/.bashrc
# Install TeX packages
RUN apt-get update && apt-get install -y \
texlive-latex-base \
texlive-latex-extra \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y python3-pip
# Copy requirements files
COPY requirements_cpu.txt ./
# Install CPU requirements
RUN pip install --no-cache-dir -r requirements_cpu.txt --no-deps
# Copy application code
COPY . .
# Set Python path
ENV PYTHONPATH=/app
# Set up bash as default shell with useful aliases
RUN echo 'alias ll="ls -la"' >> ~/.bashrc && \
echo 'alias python="python3"' >> ~/.bashrc
# Start interactive bash shell by default
CMD ["/bin/bash"]