Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
godicked committed Mar 8, 2024
2 parents ceaff2c + be23fb2 commit d4fae31
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM tyrannas/panoptic-clip-base:latest
FROM ceressorbonne/panoptic-clip-base:latest

COPY . /app
WORKDIR ./app/panoptic_back/
Expand All @@ -12,6 +12,7 @@ RUN chown -R 1000:1000 /data/
RUN chmod -R 777 /data/

ENV PANOPTIC_HOST="0.0.0.0"
ENV IS_DOCKER="True"

EXPOSE 8000

Expand Down
4 changes: 3 additions & 1 deletion Dockerfile-base.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM python:3
FROM python:3.12.2-bullseye

RUN pip3 install -U pip
RUN pip3 install MarkupSafe
RUN pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
RUN pip3 install --force-reinstall transformers typing-extensions

Expand Down
5 changes: 3 additions & 2 deletions panoptic_back/panoptic/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ def get_datadir() -> pathlib.Path:
"""

home = pathlib.Path.home()

if sys.platform == "win32":
if os.getenv('IS_DOCKER', False):
return pathlib.Path('/data')
elif sys.platform == "win32":
return home / "AppData/Roaming"
elif sys.platform == "linux":
return home / ".local/share"
Expand Down

0 comments on commit d4fae31

Please sign in to comment.