eaedk commited on
Commit
df24586
·
1 Parent(s): 7f79b6a

fixed Entrypoint and permissions

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -11
Dockerfile CHANGED
@@ -1,20 +1,17 @@
1
  FROM python:3.13.5-slim
2
 
3
- WORKDIR /app
4
-
5
- RUN apt-get update && apt-get install -y \
6
- build-essential \
7
- curl \
8
- git \
9
- && rm -rf /var/lib/apt/lists/*
10
 
11
- COPY requirements.txt ./
12
- COPY . ./
13
 
14
- RUN pip3 install -r requirements.txt
 
 
15
 
16
  EXPOSE 7860
17
 
18
  # HEALTHCHECK CMD curl --fail http://localhost:8000/_stcore/health
19
 
20
- ENTRYPOINT ["uvicorn", "_app:app", "", "--host=0.0.0.0 ", " --port=7860", "--reload"]
 
1
  FROM python:3.13.5-slim
2
 
3
+ RUN useradd -m -u 1000 user
4
+ USER user
5
+ ENV PATH="/home/user/.local/bin:$PATH"
 
 
 
 
6
 
7
+ WORKDIR /app
 
8
 
9
+ COPY --chown=user ./requirements.txt requirements.txt
10
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
11
+ COPY --chown=user . ./
12
 
13
  EXPOSE 7860
14
 
15
  # HEALTHCHECK CMD curl --fail http://localhost:8000/_stcore/health
16
 
17
+ ENTRYPOINT ["uvicorn", "_app:app", "--host", "0.0.0.0", "--port", "7860", "--reload"]