Spaces:
Sleeping
Sleeping
Migrate Space from deprecated Streamlit SDK to Docker SDK
Browse filesThe built-in Streamlit SDK base image installs libgl1-mesa-glx, which
Debian trixie no longer provides, so builds fail at the apt layer. HF
deprecated the Streamlit SDK on 2025-04-30 and recommends the Docker SDK.
Also add the missing "Llama 3.3 70b" entry to llm_dict; the Model 1
selectbox already defaulted to that key, which raised ValueError at
startup.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- .dockerignore +9 -0
- Dockerfile +24 -0
- README.md +2 -3
- app.py +1 -0
.dockerignore
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.env
|
| 2 |
+
.git
|
| 3 |
+
.gitattributes
|
| 4 |
+
.mypy_cache
|
| 5 |
+
.whisper
|
| 6 |
+
__pycache__
|
| 7 |
+
*.pyc
|
| 8 |
+
*.DS_Store
|
| 9 |
+
venv
|
Dockerfile
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
+
|
| 3 |
+
# Spaces runs the container as uid 1000.
|
| 4 |
+
RUN useradd -m -u 1000 user
|
| 5 |
+
USER user
|
| 6 |
+
ENV HOME=/home/user \
|
| 7 |
+
PATH=/home/user/.local/bin:$PATH \
|
| 8 |
+
PYTHONUNBUFFERED=1
|
| 9 |
+
|
| 10 |
+
WORKDIR /home/user/app
|
| 11 |
+
|
| 12 |
+
COPY --chown=user requirements.txt .
|
| 13 |
+
RUN pip install --no-cache-dir --upgrade pip \
|
| 14 |
+
&& pip install --no-cache-dir -r requirements.txt
|
| 15 |
+
|
| 16 |
+
COPY --chown=user . .
|
| 17 |
+
|
| 18 |
+
EXPOSE 8501
|
| 19 |
+
|
| 20 |
+
CMD ["streamlit", "run", "app.py", \
|
| 21 |
+
"--server.port=8501", \
|
| 22 |
+
"--server.address=0.0.0.0", \
|
| 23 |
+
"--server.headless=true", \
|
| 24 |
+
"--browser.gatherUsageStats=false"]
|
README.md
CHANGED
|
@@ -3,9 +3,8 @@ title: ResumeParser
|
|
| 3 |
emoji: 🔥
|
| 4 |
colorFrom: green
|
| 5 |
colorTo: blue
|
| 6 |
-
sdk:
|
| 7 |
-
|
| 8 |
-
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
# Resume Parser
|
|
|
|
| 3 |
emoji: 🔥
|
| 4 |
colorFrom: green
|
| 5 |
colorTo: blue
|
| 6 |
+
sdk: docker
|
| 7 |
+
app_port: 8501
|
|
|
|
| 8 |
pinned: false
|
| 9 |
---
|
| 10 |
# Resume Parser
|
app.py
CHANGED
|
@@ -58,6 +58,7 @@ llm_dict = {
|
|
| 58 |
"Claude 3.5 Sonnet": ChatAnthropic(model="claude-3-5-sonnet-20241022"),
|
| 59 |
"Llama 3 8b": ChatGroq(model_name="llama3-8b-8192"),
|
| 60 |
"Llama 3 70b": ChatGroq(model_name="llama3-70b-8192"),
|
|
|
|
| 61 |
"Gemma 7b": ChatGroq(model_name="gemma-7b-it"),
|
| 62 |
"Mixtral 8x7b": ChatGroq(model_name="mixtral-8x7b-32768"),
|
| 63 |
"Gemini 1.5 Pro": ChatGoogleGenerativeAI(model="gemini-1.5-pro"),
|
|
|
|
| 58 |
"Claude 3.5 Sonnet": ChatAnthropic(model="claude-3-5-sonnet-20241022"),
|
| 59 |
"Llama 3 8b": ChatGroq(model_name="llama3-8b-8192"),
|
| 60 |
"Llama 3 70b": ChatGroq(model_name="llama3-70b-8192"),
|
| 61 |
+
"Llama 3.3 70b": ChatGroq(model_name="llama-3.3-70b-versatile"),
|
| 62 |
"Gemma 7b": ChatGroq(model_name="gemma-7b-it"),
|
| 63 |
"Mixtral 8x7b": ChatGroq(model_name="mixtral-8x7b-32768"),
|
| 64 |
"Gemini 1.5 Pro": ChatGoogleGenerativeAI(model="gemini-1.5-pro"),
|