thewise commited on
Commit
23e60a5
1 Parent(s): ba4db7e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -12
Dockerfile CHANGED
@@ -1,28 +1,21 @@
1
  FROM python:3.10-slim
2
 
3
- RUN apt-get update && apt-get install -y \
4
- build-essential \
5
- curl \
6
- git \
7
- && rm -rf /var/lib/apt/lists/*
8
 
9
  RUN useradd -m -u 1000 user
10
 
11
  USER user
12
  ENV HOME=/home/user
13
  WORKDIR $HOME/app
14
-
15
- # Create github_repo directory and ensure it's owned by `user`
16
- RUN mkdir -p $HOME/app/github_repo
17
 
18
  # Copy application files
19
  COPY --chown=user requirements.txt $HOME/app/
20
  COPY --chown=user app.py $HOME/app/
21
  COPY --chown=user ./src/ $HOME/app/src/
22
 
23
- # Install dependencies
24
- RUN pip install --no-cache-dir --upgrade pip
25
- RUN pip install --no-cache-dir -r requirements.txt
26
 
27
- # The service runs on port 7860
28
  CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
 
1
  FROM python:3.10-slim
2
 
3
+ RUN apt-get update && apt-get install -y build-essential curl git && rm -rf /var/lib/apt/lists/*
4
+
5
+ WORKDIR /app
 
 
6
 
7
  RUN useradd -m -u 1000 user
8
 
9
  USER user
10
  ENV HOME=/home/user
11
  WORKDIR $HOME/app
12
+ ENV PATH="$HOME/.local/bin:${PATH}"
 
 
13
 
14
  # Copy application files
15
  COPY --chown=user requirements.txt $HOME/app/
16
  COPY --chown=user app.py $HOME/app/
17
  COPY --chown=user ./src/ $HOME/app/src/
18
 
19
+ RUN pip install --user --upgrade pip && pip install --user -r requirements.txt
 
 
20
 
 
21
  CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]