alexandraroze commited on
Commit
42fba5e
·
1 Parent(s): 5bd9341

updated docker

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -15
Dockerfile CHANGED
@@ -1,29 +1,25 @@
1
- # Install pyenv and set up Python 3.10
2
- RUN apt-get update && apt-get install -y curl \
3
- && curl https://pyenv.run | bash \
4
- && export PATH="/root/.pyenv/bin:/root/.pyenv/shims:$PATH" \
5
- && /root/.pyenv/bin/pyenv install 3.10 \
6
- && /root/.pyenv/bin/pyenv global 3.10 \
7
- && /root/.pyenv/bin/pyenv rehash
8
 
9
  # Install system dependencies
10
  RUN apt-get update && apt-get install -y \
11
- git rsync make build-essential libssl-dev zlib1g-dev \
12
- libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
13
  libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev \
14
  libffi-dev liblzma-dev git-lfs ffmpeg libsm6 libxext6 cmake \
15
  libgl1-mesa-glx fakeroot \
16
  && rm -rf /var/lib/apt/lists/* \
17
  && git lfs install
18
 
19
- # Set up fakeroot for apt-get
20
- RUN mv /usr/bin/apt-get /usr/bin/.apt-get && \
21
- echo '#!/usr/bin/env sh\nfakeroot /usr/bin/.apt-get $@' > /usr/bin/apt-get && \
22
- chmod +x /usr/bin/apt-get
 
 
23
 
24
  # Install Poetry globally
25
- RUN pip install --no-cache-dir --upgrade pip \
26
- && pip install --no-cache-dir poetry
27
 
28
  # Create a non-root user
29
  RUN useradd -m -u 1000 user
@@ -47,6 +43,12 @@ RUN poetry config virtualenvs.create false \
47
  # Copy application files
48
  COPY --chown=user . /home/user/app
49
 
 
 
 
 
 
 
50
  # Expose a port if needed (update according to your application)
51
  EXPOSE 8501
52
  # Run the Streamlit app
 
1
+ # Base image with NVIDIA CUDA
2
+ FROM nvidia/cuda:12.3.2-cudnn9-devel-ubuntu22.04
 
 
 
 
 
3
 
4
  # Install system dependencies
5
  RUN apt-get update && apt-get install -y \
6
+ curl git rsync make build-essential libssl-dev zlib1g-dev \
7
+ libbz2-dev libreadline-dev libsqlite3-dev wget llvm \
8
  libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev \
9
  libffi-dev liblzma-dev git-lfs ffmpeg libsm6 libxext6 cmake \
10
  libgl1-mesa-glx fakeroot \
11
  && rm -rf /var/lib/apt/lists/* \
12
  && git lfs install
13
 
14
+ # Install pyenv and Python 3.10
15
+ RUN curl https://pyenv.run | bash \
16
+ && export PATH="/root/.pyenv/bin:/root/.pyenv/shims:$PATH" \
17
+ && /root/.pyenv/bin/pyenv install 3.10 \
18
+ && /root/.pyenv/bin/pyenv global 3.10 \
19
+ && /root/.pyenv/bin/pyenv rehash
20
 
21
  # Install Poetry globally
22
+ RUN pip install --no-cache-dir poetry
 
23
 
24
  # Create a non-root user
25
  RUN useradd -m -u 1000 user
 
43
  # Copy application files
44
  COPY --chown=user . /home/user/app
45
 
46
+ # Expose a port (if required by your application)
47
+ EXPOSE 8501
48
+
49
+ # Define the command to run your application
50
+ CMD ["bash"]
51
+
52
  # Expose a port if needed (update according to your application)
53
  EXPOSE 8501
54
  # Run the Streamlit app