Skip to content

Commit

Permalink
Add bash shebang to redirected python and make executable
Browse files Browse the repository at this point in the history
  • Loading branch information
Jongmassey committed May 8, 2024
1 parent 6ec03c1 commit 4acc799
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ RUN --mount=type=cache,target=/var/cache/apt \
rm /usr/bin/python3 &&\
ln -s /usr/bin/python3.10 /usr/bin/python3 &&\
# Create a fake system Python pointing at venv python
echo 'exec /opt/venv/bin/python3.10 "$@"' > /usr/bin/python &&\
printf "#!/bin/bash\n/opt/venv/bin/python3.10 \"\$@\"" > /usr/bin/python &&\
#echo 'exec /opt/venv/bin/python3.10 "$@"' > /usr/bin/python &&\
chmod +x /usr/bin/python &&\
# Configure RStudio Server to run without auth
echo "auth-none=1" >> /etc/rstudio/rserver.conf &&\
echo "USER=rstudio" >> /etc/environment &&\
Expand Down
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ build:
docker build . -t research-template

smoke-test:
docker run --rm research-template ls /opt/venv/bin/python3.10
docker run --rm research-template python --version

0 comments on commit 4acc799

Please sign in to comment.