Amey9766 commited on
Commit
357646c
·
verified ·
1 Parent(s): 77a5691

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -9
Dockerfile CHANGED
@@ -1,33 +1,27 @@
1
  FROM python:3.13-slim
2
 
3
- # 1) Workdir where we copy the repo
4
  WORKDIR /workspace
5
 
6
- # 2) System deps
7
  RUN apt-get update && apt-get install -y --no-install-recommends \
8
  build-essential curl git && \
9
  rm -rf /var/lib/apt/lists/*
10
 
11
- # 3) Python/Streamlit env tweaks
12
  ENV PYTHONDONTWRITEBYTECODE=1 \
13
  PYTHONUNBUFFERED=1 \
14
  PIP_NO_CACHE_DIR=1 \
15
  STREAMLIT_HOME=/tmp \
16
  STREAMLIT_TELEMETRY_ENABLED=false
17
 
18
- # 4) Install requirements first for caching
19
  COPY requirements.txt ./requirements.txt
20
  RUN pip install -r requirements.txt
21
 
22
- # 5) Copy everything in the Space repo (including your app file)
23
  COPY . .
24
 
25
- # 6) Hugging Face Spaces provides $PORT; default for local tests
26
  ENV PORT=7860
27
- # Pick your main file here (change if your filename differs)
28
- ENV APP_FILE=streamlit_app.py
29
 
30
- # 7) Helpful listing before launching so you can debug paths quickly
31
  CMD bash -lc 'echo "CWD: $(pwd)"; echo "--- top level ---"; ls -lah; \
32
  echo "--- python files ---"; find . -maxdepth 2 -type f -name "*.py" -print; \
33
  echo "Starting Streamlit on $PORT using $APP_FILE"; \
 
1
  FROM python:3.13-slim
2
 
 
3
  WORKDIR /workspace
4
 
 
5
  RUN apt-get update && apt-get install -y --no-install-recommends \
6
  build-essential curl git && \
7
  rm -rf /var/lib/apt/lists/*
8
 
 
9
  ENV PYTHONDONTWRITEBYTECODE=1 \
10
  PYTHONUNBUFFERED=1 \
11
  PIP_NO_CACHE_DIR=1 \
12
  STREAMLIT_HOME=/tmp \
13
  STREAMLIT_TELEMETRY_ENABLED=false
14
 
 
15
  COPY requirements.txt ./requirements.txt
16
  RUN pip install -r requirements.txt
17
 
 
18
  COPY . .
19
 
20
+ # HF Spaces provides $PORT; default for local tests
21
  ENV PORT=7860
22
+ # 👇 your app is under ./src
23
+ ENV APP_FILE=src/streamlit_app.py
24
 
 
25
  CMD bash -lc 'echo "CWD: $(pwd)"; echo "--- top level ---"; ls -lah; \
26
  echo "--- python files ---"; find . -maxdepth 2 -type f -name "*.py" -print; \
27
  echo "Starting Streamlit on $PORT using $APP_FILE"; \