davoodwadi commited on
Commit
6ee3c4a
·
1 Parent(s): a931198
Files changed (1) hide show
  1. Dockerfile +7 -10
Dockerfile CHANGED
@@ -2,14 +2,11 @@ FROM python:3.13.5-slim
2
 
3
  COPY --from=ghcr.io/astral-sh/uv:0.9.0 /uv /uvx /bin/
4
 
5
- ENV HOME=/app
6
- # Store runtime caches separately
7
- ENV UV_CACHE_DIR=/app/.uv-cache
8
- RUN mkdir -p /app/.uv-cache && chmod -R 777 /app/.uv-cache
9
 
 
10
  ENV SENTENCE_TRANSFORMERS_HOME=/app/.cache
11
 
12
-
13
  RUN apt-get update && apt-get install -y \
14
  build-essential \
15
  curl \
@@ -17,23 +14,23 @@ RUN apt-get update && apt-get install -y \
17
  && rm -rf /var/lib/apt/lists/*
18
 
19
  # Ensure the installed binary is on the `PATH`
20
- ENV PATH="/root/.local/bin/:$PATH"
21
 
22
  # Copy the project into the image
23
  ADD . /app
24
 
25
- # Ensure cache dir exists and is writable
26
- RUN mkdir -p /app/.cache/uv && chmod -R 777 /app/.cache
27
 
28
  # Sync the project into a new environment, asserting the lockfile is up to date
29
- WORKDIR /app
30
  RUN uv sync --locked
31
 
 
 
 
32
  EXPOSE 8501
33
 
34
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
35
 
36
- ENTRYPOINT ["uv", "run", "main.py"]
37
 
38
  # COPY src/ ./src/
39
  # COPY labelled_data/ ./labelled_data/
 
2
 
3
  COPY --from=ghcr.io/astral-sh/uv:0.9.0 /uv /uvx /bin/
4
 
5
+ WORKDIR /app
 
 
 
6
 
7
+ ENV HOME=/app
8
  ENV SENTENCE_TRANSFORMERS_HOME=/app/.cache
9
 
 
10
  RUN apt-get update && apt-get install -y \
11
  build-essential \
12
  curl \
 
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
  # Ensure the installed binary is on the `PATH`
17
+ # ENV PATH="/root/.local/bin/:$PATH"
18
 
19
  # Copy the project into the image
20
  ADD . /app
21
 
 
 
22
 
23
  # Sync the project into a new environment, asserting the lockfile is up to date
 
24
  RUN uv sync --locked
25
 
26
+ # Set PATH so we can easily call Python from the .venv
27
+ ENV PATH="/app/.venv/bin:$PATH"
28
+
29
  EXPOSE 8501
30
 
31
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
32
 
33
+ ENTRYPOINT ["python", "main.py"]
34
 
35
  # COPY src/ ./src/
36
  # COPY labelled_data/ ./labelled_data/