Mubarak-finopsly commited on
Commit
4cee414
·
verified ·
1 Parent(s): 9601e8b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -16
Dockerfile CHANGED
@@ -1,19 +1,15 @@
1
- FROM python:3.12-slim
 
2
 
3
- # system deps (optional)
4
- RUN apt-get update && apt-get install -y git git-lfs && rm -rf /var/lib/apt/lists/*
 
 
 
 
5
 
6
- # pass HF token as build-arg (build-time secret)
7
- ARG HF_TOKEN
8
- # safer than putting token in URL
9
- RUN git -c "http.extraheader=Authorization: Bearer ${HF_TOKEN}" \
10
- clone --depth 1 https://huggingface.co/spaces/Mubarak-finopsly/costix-backend /app/private
11
 
12
- WORKDIR /app/private
13
- # install the private repo the same way it expects
14
- # (replace with its own requirements/setup)
15
- RUN pip install --no-cache-dir -r requirements.txt
16
-
17
- # expose the private app (adjust entrypoint if needed)
18
- ENV GRADIO_SERVER_NAME=0.0.0.0
19
- CMD ["python", "app.py"]
 
1
+ # Use private Hugging Face Space image as base
2
+ FROM registry.hf.space/mubarak-finopsly-costix-backend:latest
3
 
4
+ # Set environment variables (will be overridden via HF Variables & Secrets)
5
+ ENV OPENAI_API_KEY=""
6
+ ENV LANGSMITH_API_KEY=""
7
+ ENV LANGSMITH_TRACING=true
8
+ ENV LANGSMITH_ENDPOINT=https://api.smith.langchain.com
9
+ ENV LANGSMITH_PROJECT=costix-python-hugging-face
10
 
11
+ # Expose Gradio port
12
+ EXPOSE 7860
 
 
 
13
 
14
+ # Optionally override CMD if needed (else will use the one in the private image)
15
+ # CMD ["python3", "app.py"]