wolf1997 commited on
Commit
43c856b
·
verified ·
1 Parent(s): f3722c5

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +37 -36
Dockerfile CHANGED
@@ -1,37 +1,38 @@
1
- # Use Python 3.13 slim image as base
2
- FROM python:3.13.2-slim
3
-
4
- # Set working directory
5
- WORKDIR /app
6
-
7
- # Set environment variables
8
- ENV PYTHONDONTWRITEBYTECODE=1 \
9
- PYTHONUNBUFFERED=1 \
10
- STREAMLIT_SERVER_PORT=8501 \
11
- STREAMLIT_SERVER_ADDRESS=0.0.0.0 \
12
- UV_CACHE_DIR=/tmp/uv-cache
13
-
14
- # Install system dependencies and uv
15
- RUN apt-get update && apt-get install -y \
16
- build-essential \
17
- curl \
18
- && rm -rf /var/lib/apt/lists/* \
19
- && curl -LsSf https://astral.sh/uv/install.sh | sh
20
-
21
- # Add uv to PATH
22
- ENV PATH="/root/.cargo/bin:$PATH"
23
-
24
- # Copy project files
25
- COPY pyproject.toml uv.lock* ./
26
-
27
- # Install dependencies using uv
28
- RUN uv sync --frozen --no-dev
29
-
30
- # Copy the rest of the application
31
- COPY . .
32
-
33
- # Expose the port Streamlit runs on
34
- EXPOSE 8501
35
-
36
- # Command to run the application using uv
 
37
  CMD ["uv", "run", "streamlit", "run", "app.py"]
 
1
+ # Use Python 3.13 slim image as base
2
+ FROM python:3.13.2-slim
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Set environment variables
8
+ ENV PYTHONDONTWRITEBYTECODE=1 \
9
+ PYTHONUNBUFFERED=1 \
10
+ STREAMLIT_SERVER_PORT=8501 \
11
+ STREAMLIT_SERVER_ADDRESS=0.0.0.0 \
12
+ UV_CACHE_DIR=/tmp/uv-cache
13
+
14
+ # Install system dependencies and uv
15
+ RUN apt-get update && apt-get install -y \
16
+ build-essential \
17
+ curl \
18
+ && rm -rf /var/lib/apt/lists/* \
19
+ && curl -LsSf https://astral.sh/uv/install.sh | sh \
20
+ && /root/.cargo/bin/uv --version
21
+
22
+ # Add uv to PATH
23
+ ENV PATH="/root/.cargo/bin:$PATH"
24
+
25
+ # Copy project files
26
+ COPY pyproject.toml uv.lock* ./
27
+
28
+ # Install dependencies using uv with full path to ensure it's found
29
+ RUN /root/.cargo/bin/uv sync --frozen --no-dev
30
+
31
+ # Copy the rest of the application
32
+ COPY . .
33
+
34
+ # Expose the port Streamlit runs on
35
+ EXPOSE 8501
36
+
37
+ # Command to run the application using uv
38
  CMD ["uv", "run", "streamlit", "run", "app.py"]