CihanYakar commited on
Commit
271ee91
·
1 Parent(s): f087cee
Files changed (2) hide show
  1. Dockerfile +4 -4
  2. app/main.py +1 -1
Dockerfile CHANGED
@@ -1,12 +1,12 @@
1
  FROM python:3.9-slim
2
-
3
  WORKDIR /code
4
-
5
  COPY ./requirements.txt /code/requirements.txt
6
  COPY ./app /code/app
7
 
8
- RUN pip install --no-cache-dir -r requirements.txt
 
 
9
 
 
10
  EXPOSE 7860
11
-
12
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.9-slim
 
2
  WORKDIR /code
 
3
  COPY ./requirements.txt /code/requirements.txt
4
  COPY ./app /code/app
5
 
6
+ # Cache dizini oluştur ve izinleri ayarla
7
+ RUN mkdir -p /code/cache && \
8
+ chmod 777 /code/cache
9
 
10
+ RUN pip install --no-cache-dir -r requirements.txt
11
  EXPOSE 7860
 
12
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
app/main.py CHANGED
@@ -20,7 +20,7 @@ app.add_middleware(
20
  allow_headers=["*"],
21
  )
22
 
23
- CACHE_FILE = "menu_cache.json"
24
  CLAUDE_API_KEY = os.getenv("CLAUDE_API_KEY")
25
 
26
  if not CLAUDE_API_KEY:
 
20
  allow_headers=["*"],
21
  )
22
 
23
+ CACHE_FILE = "cache/menu_cache.json"
24
  CLAUDE_API_KEY = os.getenv("CLAUDE_API_KEY")
25
 
26
  if not CLAUDE_API_KEY: